4 msgExtracting all functions from C++ source code
2 msgForce GCC to unroll a loop?

Syslog fixes a bug?
\ Michael Wieher (7 May 2008)
. \ John Love-Jensen (8 May 2008)
. \ Atwood, Robert C (8 May 2008)
. \ candido lopez rodriguez (8 May 2008)
. \ Philipp Thomas (9 May 2008)

2 msggcc 4.2.x large file support
2 msgWindows DEP problem with nested functions
8 msgPorting GCC to 8051 Microcontroller
2 msgCleanup for thread local storage?
3 msgGCC 4.3.2 Install into Cygwin
4 msggcno file doesn't include uncalled member funct...
3 msgGCC 4.3.0 configure failure: libgcc
2 msglex/yacc
1 msgBuilding trunk -- error msg instrucitons not qu...
2 msgMIPS atomic builtins
3 msgEnabling loop unrolling in small sections of code.
1 msg#pragma warning
2 msgProblems building gcc 4.3
8 msggcc 4.3.0 -- program search path issue
1 msgRe: WELCOME to gcc
2 msgInclude paths for cpp/g++ (gcc 4.3.0)
2 msgLinking a library and source file into another ...
Subject:Re: Syslog fixes a bug?
Group:Gcc-help
From:John Love-Jensen
Date:8 May 2008


Hi Michael,

> I have a program that dies mysteriously.

I hate it when that happens.

> If I use syslog() to attempt to write data and see where it dies, it
> lives and works perfectly.

Sounds like your program has a bug.

> If I comment out the syslog() function call, the program crashes every time.

What do you see with a debugger, such as gdb?

> This is entirely reliable, have tested it 10 times commented +
> uncommented. It is a line of static text, ie:
> syslog(LOG_INFO,"hello");

I was not able to reproduce your issue in a small toy program.

Do you have any short, sample source code that reproduces the problem?

> Why / how would this affect my program's execution?

Most often for such kinds of "heisenbugs" (bugs that go away when you look
for them), the instrumentation of the code changes the codes layout such
that the bug is then bollixing up something innocuous instead of bollixing
up something critical.

The bug is still there, it's just in stealth mode.

Usually such bugs are due to cavalier casting or buffer overruns. (Although
on one occasion about 23 years ago, I discovered a bug in the compiler
itself, where it conflated double and long double, but they weren't the same
size on Intel 80286/287 / MS-DOS architecture. Not GCC.)

HTH,
--Eljay



© 2004-2008 readlist.com