[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] standalone backtraces

From: Michael Matz
Subject: Re: [Tinycc-devel] standalone backtraces
Date: Mon, 20 Jan 2020 06:02:47 +0100 (CET)
User-agent: Alpine 2.21 (LSU 202 2017-01-01)


On Sun, 19 Jan 2020, grischka wrote:

Herman ten Brugge wrote:
 I need only 1. I modified the code. See attached patch.

I don't think so.

Basically, in tinycc, before you add new code, always try if you
can solve the problem by just removing old code first.

(Also, please don't make changes to existing code without any
comments, unless really obvious for everybody).

Anyway, should work now. See

 Btw, there seems to be a bug in the sym-version code that crashes
 tcc when it tries to link with a .so, for example:

     echo "void f() {}" | tcc - -shared -o a.so
     echo "main() {}" | tcc - a.so
     <segmentation fault>

 I cannot reproduce this. I checkout a fresh copy and see no problem.
 I use Fedora 31 with all updates.

see for example

 +./a.exe: error while loading shared libraries: ./a1.so: unsupported
   25960 of Verneed record

Fixed in https://repo.or.cz/tinycc.git/commitdiff/fdeeb62

Also the stack usage for nested expressions you noted in the d79e1dee commit might be be a bit smaller now, I've reworked the expression parser to be a precedence parser for the easy cases, so there's now only one recursion level per higher precedence operator. Of course it's still possible to write expression that need unbounded recursion depth.


--- grischka



Tinycc-devel mailing list

reply via email to

[Prev in Thread] Current Thread [Next in Thread]