10
dder
4y

compile with gcc, ./a.out: "Segmentation fault (core dumped)"

compile with clang, ./a.out: runs and fails.

compile with cc, ./a.out: Alternated between "Error: Too many arguments" and "Segmentation fault"...

ffs I'm done for the week I guess.
The problem is not that it fails, the problem is that it alternates because of time of compilation, power consumption, random blody oracles or the phase of the moon in a leap year on a Friday the 13th. God.Please.Send.~Nudes~. Help.

Comments
  • 2
    compile using -g and run it in with valgrind, if you haven't already tried that :)
  • 0
    Stack corruption maybe?
  • 1
    Boiled it down to linking problems.
    Using cc,gcc,clang to link, to avoid to have too many lib args... (gcc -v ffs.obj -o yolo scares me...)
  • 3
    Wut ? argc is 0xf7ffe140 ? Wtf is happening ?
  • 0
  • 0
    Don’t try to link with
    $(CC) -lc -e main for.o fuck.o sake.o

    Just omit “-e main”.
    Supposed to be an entry point but instead, everything goes tits up!
  • 1
    @Root u are not helping ! 😐
  • 1
    @dder 4,160,741,696 args is bloody hilarious 😂

    Glad I’m not the only one whose world isn’t making any sense.
  • 0
    @Root well yeah it also treated it as signed which looked even more obscure.

    Evidently, the linking with ‘-e bloody main’ did not initialize argc.

    Well at least I learned something 🙆🏽‍♂️
  • 0
    Is it... is it friday already?

    Wait hang on.
    Ah right, time zones.
  • 0
    @M1sf3t have you been drinking again?
  • 1
    @Ranchu no, me in Australia, GMT-9:30, and it’s still Thu... there is no Friday atm anywhere
Add Comment