This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: language option segfault


Jeffrey A Law wrote:
> 
>   In message <35AEC28A.5535@tssc.co.nz>you write:
>   > (I think I have a merge of mainline and 1.1 branches)
> I don't understand what you're trying to say.

Taht I'm not sure which branch the problem was in.


> 
>   > This fixes a bug introduced with `DEFINE_LANG_NAME'.  Most places seem
>   > to check for a null options, but this one forgot.
>   >
>   >     * toplev.c (main): check option is non-null before
>   >     testing against it
> What specifically are you trying to fix?  ie, what command would I
> have to issue to get this core dump?

cc1 (and possibly the others) would die on startup. `./xgcc -B./ foo.c'
is sufficient to generated the core dump.

> I ask this because check_lang_option checks for arguments with are
> NULL and should do the right thing.

It wasn't the argument that was null, but the long-option string in the
internal table that was null (a null pointer is used as a separator
between language specific options).

Bill
-- 
Leave others their otherness


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]