[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pcc-list
Subject:    Re: Crash in compilation process. division by zero?
From:       Anders Magnusson <ragge () ludd ! ltu ! se>
Date:       2010-07-08 8:59:57
Message-ID: 4C35938D.9010908 () ludd ! ltu ! se
[Download RAW message or body]

Tony Cui wrote:
> Hi Ragge,
>    I just come across a crash from PCC frontend. The debugging trace 
> indicated it is a divide-by-zero runtime error, occured at:
>
>    pftn.c ->
>      int oalloc(struct symtab *p, int *poff ) ->
>           the first time SETOFF() is called
>
>         if (noff < 0)
>             cerror("stack overflow");
>         SETOFF(noff, al);
>
>    When 'al' is zero, we get this run time error.  For now, I simply 
> put a conditon check to ensure al is non-zero. But would that trigger 
> other side-effect? Any ideas?
The bug is somewhere else; al cannot be zero here.  I would like to see 
the code that causes this bug.

-- Ragge
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic