tinycc-devel
[Top][All Lists]
Advanced

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

Re: [Tinycc-devel] crash with -b


From: Christian Jullien
Subject: Re: [Tinycc-devel] crash with -b
Date: Mon, 5 Apr 2021 08:34:20 +0200

Hello, I don't have Ubuntu but I can't reproduce on Fedora x86_64, Debian arm32 
or Windows x86_64

[jullien@fedora64 ~]$ tcc -b foo.c
[jullien@fedora64 ~]$ ./a.out 
[jullien@fedora64 ~]$ tcc -v
tcc version 0.9.27 - aa77279 (x86_64 Linux)

jullien@sims4:~ $ tcc -b foo.c
jullien@sims4:~ $ ./a.out
jullien@sims4:~ $ tcc -v
tcc version 0.9.27 - aa77279 (ARM eabihf Linux)


c:>tcc -b foo.c
c:>foo
c:>tcc -v
tcc version 0.9.27 - aa77279 (x86_64 Windows)


Can you give us more info? Are you running aa77279?
What happens if you use 
https://repo.or.cz/tinycc.git/snapshot/e4f151c4cda30fd4c06655d87c3df02b6513fb54.tar.gz
With previous code for relocplt?

C.

-----Original Message-----
From: Tinycc-devel [mailto:tinycc-devel-bounces+eligis=orange.fr@nongnu.org] On 
Behalf Of Yakov
Sent: Sunday, April 04, 2021 22:02
To: Tinycc-devel@nongnu.org
Subject: [Tinycc-devel] crash with -b

this coredumps with latest pull from mob if compiled with -b on ubuntu 20.
took me half a day to boil it down from my large program.
---- 8< ---------------------------------
#include <stdlib.h>
#include <stdio.h>

void mm(char *d, const char *s) {
    d[0] = s[0];
}

int main(int argc, char**argv) {
    char *b = "c";
    char **a = malloc(sizeof(void*));
    a[0] = malloc(1);
    mm(a[0], b);
}

_______________________________________________
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel




reply via email to

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