Skip to content
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

Segfault while trying to access null-objects. #2

Open
RealyUniqueName opened this issue Oct 31, 2013 · 4 comments
Open

Segfault while trying to access null-objects. #2

RealyUniqueName opened this issue Oct 31, 2013 · 4 comments

Comments

@RealyUniqueName
Copy link
Member

I'm experiencing the same issue with haxelib mod_tora and git neko: http://haxe.org/forum/thread/3395#nabble-td6791774
Haxe code to reproduce:

var q : Dynamic = null;
q.some;

For the first attempt to access null object i get segfault message sent to my browser from my module:

Error : Segmentation fault
Called from a C function
Called from fst/Fst.hx line 17
Called from ? line 1
Called from D:\Projects\haxe/std/neko/vm/Module.hx line 52
Called from Tora.hx line 333
Called from D:\Projects\haxe/std/neko/vm/Loader.hx line 154
Called from D:\Projects\haxe/std/neko/vm/Loader.hx line 132
Called from Tora.hx line 479

Then i hit 'refresh' in browser and for the second attempt:

Error : Segmentation fault
Called from Tora.hx line 483

And the last try:
in browser: Error : Connection Closed
in terminal:

$ haxelib run tora
[2013-10-31 11:58:36] Starting Tora server on 127.0.0.1:6666 with 32 threads
Segmentation fault (core dumped)

At this point my web service is completely broken because of tora shutdown :)

My system: Ubuntu 12.04 32bit

Is it possible to fix this issue without disabling JIT?

@RealyUniqueName
Copy link
Member Author

Also this happens even if i enclose unsafe code with try...catch

@ncannasse
Copy link
Member

Could you run in gdb and get a backtrace for the thread that Segfault?

@RealyUniqueName
Copy link
Member Author

Sorry, i've never used gdb :)
I started gdb, attached to neko process, but i don't know how to find out which thread i need to attach to and how do i control program flow.

@RealyUniqueName
Copy link
Member Author

Binaries downloaded from nekovm.org are not affected by this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants