pouët.net

Go to bottom

Anyone with Linux, pls halp

category: general [glöplog]
FYI, both importtest2 and the binary produced from the source code you linked cause a seg fault here. I traced the fault back to this line:
Code: 309 mov cl, __num_imports ;assumes ecx=0

Assumption FAIL!
added on the 2008-09-20 23:57:13 by Deltafire Deltafire
Hmph. Well that line certainly won't be causing a segfault anyhow. The source code is the exact source used to make importtest2 and the actual import code is unchanged, just the OpenGL code (using glColor4ubv rather than glColor3i). Do you get any text in the terminal?
No, it isn't seg-faulting at that line, but the assumption on that line is what's causing it to seg-fault later in the program, due to ecx containing a much larger number than __num_imports and consequently reading past the end of the __import: table.
Everything works fine if I change that line to use the ecx register instead of just cl.
added on the 2008-09-21 10:44:16 by Deltafire Deltafire
Ah good, that's easy to fix :) Thanks.

login

Go to top