[coreboot] Ouch: romcc "x[0] |= something" patch causes another crash

Stefan Reinauer stepan at coresystems.de
Mon Mar 15 20:48:17 CET 2010


On 3/15/10 8:28 PM, ron minnich wrote:
> On Mon, Mar 15, 2010 at 10:27 AM, Eric W. Biederman
> <ebiederm at xmission.com> wrote:
>
>   
>> My practical concern is that there is no support for the general case where
>> you do:
>> char array[5];
>> for (i = 0; i < 5; i++) {
>>    array[i] = 7;
>> }
>>     
> The bigger problem is that people are trying to take this compiler
> beyond what makes sense (to me). I'm not sure we're going to cease to
> exist if we don't have arrays.
>   
I agree we don't necessarily need to have such arrays. I think we just
naturally assumed it should work,
so no attempt to sneak anything in.

What's implemented and what is not is hidden in Eric's brain and in a
single file of 25k lines of code.

If we don't want non-static non-const arrays, can we easily detect them
in the code and give the user an error message that is better than a
segfault?
"You're a fool because you used non-const non-static arrays in romcc"
would be fine. Just dropping dead without error is certainly less helpful.
> If romcc can't do something, then work around it; we can warn people
> about no arrays. But given that nobody has the time to really support
> romcc (as, e.g., gcc or llvm are supported) we're taking some real
> risks just plugging changes in.
>   
The changes were merely trying to fix the segfaults, not implement or
change anything big. I think we do want fixes for segfaults. Always.

Stefan

-- 
coresystems GmbH • Brahmsstr. 16 • D-79104 Freiburg i. Br.
      Tel.: +49 761 7668825 • Fax: +49 761 7664613
Email: info at coresystems.dehttp://www.coresystems.de/
Registergericht: Amtsgericht Freiburg • HRB 7656
Geschäftsführer: Stefan Reinauer • Ust-IdNr.: DE245674866





More information about the coreboot mailing list