First of all, thanks for all your help, it's really appreciated :-)
When trying to hack together a small testcase I stumbled in some really
strange problems: removing object-files that have absolutely nothing to
do with the problem (e.g. the commandline-parsing code, which doesn't
even get executed anymore) made the Segfault go away. Linking the
program with that (dead) code included made it reapear. Other causes
that made the segfault go away was
commenting out sections of code (that again, have nothing to do with the
problem), removing variables from classes, ... So i'm still not able to
give a simple testcase.
Brian Dessent wrote:
Thomas Unterthiner wrote:
How can I check for proper stack-alignment? (I am terribly bad at
assembly, so should any asm be required a code-snippet would be great).
I would just fire up a debugger, put a breakpoint at main, and look at
$esp at that point.
At the beginning of main() esp has a value of 0x22ff7c - Independently
of wether the Segfault appears or not. However, those are the first
disassembled lines of the main-function (none of which have been
executed at the point where i looked at the value of esp):
0x40832a lea 0x4(%esp),%ecx
0x40832e and $0xfffffff0,%esp
0x408331 pushl 0xfffffffc(%ecx)
0x408334 push %ebp
0x408335 mov %esp,%ebp
Wouldn't the line at 0x4832e align the value of %esp?