> Or at least fail with an explanatory
> message if o() is called while nocode_wanted is set?
How to get backtrace from the o() in such case (w/o debugger)?


2016-04-03 12:13 GMT+03:00 Edmund Grimley Evans <
[email protected]>:

> > Hi! The following test hangs when compiled with tcc after 737f98421
> >       tccgen.c: Bug fix for 992cbda and 3ff77a1: set nocode_wanted.
> >       tests/tests2/78_vla_label.*: Add test
>
> The change introduced at 737f98421 depends on "nocode_wanted" working.
> But it doesn't work, of course. It's broken probably in lots of ways,
> but in particular a "do" loop will generate code when it shouldn't. So
> another instance of the same bug is demonstrated by this:
>
> int main()
> {
>     return sizeof( ({ do { } while (1); }), 0 );
> }
>
> (So the bug perhaps only affects statement expressions, which are not
> part of standard C.)
>
> I wonder, how feasible is it to find every place in tccgen.c where a
> back-end function like gjmp might be called and ensure that it won't
> be called when nocode_wanted is set? Could this be done more
> systematically at a lower level? Or at least fail with an explanatory
> message if o() is called while nocode_wanted is set?
>
> Edmund
>
> _______________________________________________
> Tinycc-devel mailing list
> [email protected]
> https://lists.nongnu.org/mailman/listinfo/tinycc-devel
>
_______________________________________________
Tinycc-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel

Reply via email to