-
Notifications
You must be signed in to change notification settings - Fork 37
Crash trying to retrieve userid from pointer? #123
New issue
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
Comments
The crash happens when you call the function with an invalid pointer. I will add more checks to prevent a crash. |
This adds more security checks when converting from a pointer.
Version 327 will probably fix your issue. Please test the new version when it's ready and tell me if you are still experiencing crashes. |
Thank you! I will test this on a single server for now, as there is a memory leak I'm trying to reproduce (I noticed around 500MB leaked in 1 hour after updating to build 322, though it may have been other factors). I'll open another issue about the memory leak if I can prove it's somehow tied to Source.Python. |
Just got a crash running version 327, seems to be related: https://crash.limetech.org/iwedgblu5oc5 |
To be honest that crash dump doesn't really help me, because it seems to strip off the relevant information. Can you start your server with the -debug option and post the resulting debug.log? |
Oh wow, wish I knew about -debug before! Here's the output: http://hastebin.com/raw/orenasudoq EDIT: |
That's a really strange error. Does it perhaps occur, because of the memory leak in issue #124? |
Could it be this line?
I did some digging and found that this was changed a month or two after SP version 73 was built, in commit e2e613b Can (invalid?) pointers always be cast to char? |
Yes, that is just the object representation. It should always work. |
@jsza Do you still experience crashes? |
Uh oh!
There was an error while loading. Please reload this page.
Running build 322 on TF2 (linux): http://builds.sourcepython.com/job/Source.Python/322/artifact/release/source-python-tf2-May-01-2016.zip
I've been seeing this crash rather frequently since updating my plugin to SP version 322 (I was running version 73 before)
EDIT: Just to clarify, this crash is new since updating to 322.
https://crash.limetech.org/d3j7rqvcgbyf
I tried looking through core.so in IDA Free, but I couldn't make much sense of the assembly. I did, however see a string referring to UseridFromPointer at the top of the stack.
The only place in my plugin calling that function is the following. I've tried to reproduce the crash by triggering the startTouch/endTouch callbacks as well as disconnecting while inside a trigger. Neither seems to cause it.
The text was updated successfully, but these errors were encountered: