tinycc-devel
[Top][All Lists]
Advanced

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

[Tinycc-devel] Segfault on arm64 when making a function call with many a


From: Arthur Williams
Subject: [Tinycc-devel] Segfault on arm64 when making a function call with many arguments
Date: Wed, 16 Jun 2021 11:17:53 -0700

Was trying to compile vim with tcc on arm64 but got a segfault. I can simplify it to the following case:

  void map_add(){}
  void main() {
    int A;
    int B;
    map_add(0, 0, 0, 0, 0, 0, 0, 0, A && B); // segfaults when compiling
  }

The bad pointer was generated in arm64-gen.c::gsym_addr and the actual segfault occurred in tcc.h::read16le.
Removing one of the 0s or removing A/B or replacing A && B with a constant avoids the problem. Cannot repro on x86. I'm running musl on Linux and using the latest tcc from mob.


reply via email to

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