soq icon indicating copy to clipboard operation
soq copied to clipboard

debug.c: Attempts to close stderr

Open USSX-Hares opened this issue 11 months ago • 1 comments

https://github.com/jleffler/soq/blob/bb84e0704fb66a558fbcf507f43e76a7a547930e/src/libsoq/debug.c#L57C1-L59C1

        if (debugfp != stdin && debugfp != stdout && debugfp != stderr)
            fclose(debugfp);
        debugfp = dbfp;

In main:

    db_setfileptr(stderr);

Here, debugfp is initialized with 0 and then is attempted to close in db_setfileptr, leading to SEGFAULT

USSX-Hares avatar Jan 26 '25 15:01 USSX-Hares