G'day verigoth!
Not knowing the SDL I'm just citing the gcc-hotwo
because string and seg-fault match
_________________________________________________________________
Writable strings (program seg faults randomly)
GCC has an optimistic view of its users, believing that they intend
string constants to be exactly that --- constant. Thus, it stores them
in the text (code) area of the program, where they can be paged in and
out from the program's disk image (instead of taking up swapspace),
and any attempt to rewrite them will cause a segmentation fault. This
is a feature!
It may cause a problem for old programs that, for example, call
mktemp() with a string constant as argument. mktemp() attempts to
rewrite its argument in place.
To fix, either (a) compile with -fwritable-strings, to get gcc to put
constants in data space, or (b) rewrite the offending parts to
allocate a non-constant string and strcpy the data into it before
calling.
_________________________________________________________________
Cheers,
Tink (hope it helps)