[Gross] gross with SJMS : "imsimta test mapping" return no such file or directory

Eino Tuominen eino at utu.fi
Thu May 14 07:48:59 EEST 2009


Armand Delcros wrote:
> On Tue, May 12, 2009 at 6:43 AM, Eino Tuominen <eino at utu.fi> wrote:
> 
>> Well, I should have noticed the stack trace was messed up, sorry about that.
>> Try to compile with -DARGDEBUG (or uncomment the relevant line in
>> grosscheck.c). That should create /tmp/argout file and write in the
>> arguments from the caller.
> 
> Hello,
> 
> I added the "-DARGDEBUG" but no file "/tmp/argout" has appeared.
> I  commented out the grosscheck.c: #define ARGDEBUG directive also but
> same result : no file "/tmp/argout" appeared after provocating the
> core dump.

Yes, it dumps core before the creation of the file. I really don't know 
what's the problem here. Actually, grosscheck checks that arg is defined 
   at line 82 of the code:

	assert(arg);

But the code crashes at line 98

         strncpy(buffer, arg, *arglen);

Only thing I can think of is that arglen is wrong and strncpy writes 
beyond buffer. There should be check in the code for that, for debugging 
you could add a line:

	assert(*arglen < SBUFLEN);

Place it somewhere between assert(arg) and strncpy.

Hope this helps,

-- 
   Eino Tuominen




More information about the Gross mailing list