We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
it seems my initial guess of why calloc caused so many segfaults was wrong.
calloc
example:
from pointers import calloc, free mem = calloc(200, 28) mem += 200 mem <<= 1 mem -= 200 print(~mem) # works just fine! free(mem) mem_2 = calloc(4, 28) mem_2 += 1 mem_2 <<= 1 mem_2 -= 1 print(*mem_2) # segfault
it seems that i need to skip 24 digits when using pointer arithmetic, not 1.
mem = calloc(200, 28) mem += 24 mem <<= 1 mem -= 24 print(~mem) # works correctly, no segfault
another example:
mem = calloc(200, 28) mem += 23 mem <<= 1 mem -= 23 print(~mem) # OverflowError
The text was updated successfully, but these errors were encountered:
add support for rich and patch #11
6f0ab46
No branches or pull requests
it seems my initial guess of why
calloc
caused so many segfaults was wrong.example:
it seems that i need to skip 24 digits when using pointer arithmetic, not 1.
another example:
The text was updated successfully, but these errors were encountered: