Kurt Roeckx wrote:
> When running the regression tests, I rc.test failing.  When running
> "TEST_RC=--no-load ../rc -t xxx MUMBLE" I get the following error:
> *** glibc detected *** ../rc: free(): invalid pointer: 0x00000000018d4010 ***
> ======= Backtrace: =========
> /lib/libc.so.6[0x7f78a4f64d56]
> ../rc[0x40a4f1]
> ../rc[0x40b6d1]
> ../rc[0x401da3]
> /lib/libc.so.6(__libc_start_main+0xfd)[0x7f78a4f12abd]
> ../rc[0x401cb9]
> ======= Memory map: ========
> [...]
> 
> With a core file this looks like:
> #4  0x000000000040a511 in doPrognameEnv (pOpts=0x613220, type=ENV_IMM)
>     at environment.c:106

That value is obtained from ao_string_tokenize( pczOptStr );
Memory management structures have become corrupt.
In chasing this a bit, I did discover a bug I introduced:
This assert became obsolete in longOptionFind():

    do  {
        if (SKIP_OPT(pOD)) {
            if (  (pOD->fOptState != (OPTST_OMITTED | OPTST_NO_INIT))
               || (pOD->pz_Name == NULL))
                continue;
        }
        else assert(pOD->pz_Name != NULL);

It now means that the entry should be ignored.  The correct form is now:

    do  {
        /*
         *  If option disabled or a doc option, skip to next
         */
        if (pOD->pz_Name == NULL)
            continue;

        if (  SKIP_OPT(pOD)
           && (pOD->fOptState != (OPTST_OMITTED | OPTST_NO_INIT)))
            continue;

If this fixes the problem, I'll be a happy camper and not chase it any more.  :)
Thanks -Bruce



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to