Here is my analysis: In ctok_teken_t, there is a BEGINobjInstance. BEGINobjInstance is a #define and is defined to obj_t objData which is the same for both NDEBUG defined and not defined. But obj_t is a typedef of struct obj_s. In the structure definition for obj_s in obj-types.h are the following lines: #ifndef NDEBUG unsigned int iObjCooCKiE; #endif
NDEBUG is defined in config.h which was included in the runtime for rsyslog but not for test-parse.c I didn't compile the code to test my theory. I just did a quick check. Hope that solved your problem. Scott I think this may be why the you are getting this structure misalignment? On Fri, Jul 4, 2008 at 2:24 AM, Rainer Gerhards <[EMAIL PROTECTED]> wrote: > Hi list, > > I am posting a question here in the hope that some of the subscribers > may be able to lend me a helping hand. > > Recently, I have begun to add a testbench to rsyslog. The idea is that > over time the project should have canned tests which are easy to run on > each version (as part of make distcheck at latest), increasing the > overall code quality. > > "All" (so far two ;)) tests are located in the tests subdirectory. One > test fails if compiled in release mode, that is rscript-parse.c. I have > tracked down the failure cause and it is different struct member > alignment in the ctok_token_t structure. The alignment is different in > the rsyslog runtime and this test tool (I have compared the offsets > computed for pToken->tok and they are different). So far, so good. But I > do not find the cause of this misalignment. I checked the make output, > and as it looks both the runtime as well as the tool are compiled with > the same compiler options. Also, in debug mode it works OK, but in > release mode (--disable-debug) it fails. > > I am sure the problem is something quite simple, but I have run out of > ideas of what it may be (or, more probable, I simply overlook > something). > > Any help would be deeply appreciated. > > Thanks, > Rainer > _______________________________________________ > rsyslog mailing list > http://lists.adiscon.net/mailman/listinfo/rsyslog > _______________________________________________ rsyslog mailing list http://lists.adiscon.net/mailman/listinfo/rsyslog

