[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Tinycc-devel] Segfault on musl with '-run'
From: |
Страхиња Радић |
Subject: |
Re: [Tinycc-devel] Segfault on musl with '-run' |
Date: |
Wed, 20 Jul 2022 13:08:10 +0200 |
On 22/07/19 09:03, Arthur Williams via Tinycc-devel wrote:
> Hi,
>
> Was writing an application and noticed a bug. The script can be reduced
> to the following:
>
> ```
> #!/bin/tcc -run
> #include <time.h>
> int main() {
> struct timespec start, current;
> clock_gettime(CLOCK_MONOTONIC, &start); // Segfaults
> }
> ```
>
> When the file is executed, it crashes at the indicated line. If I
> explicitly compile the program and run it, it behaves correctly. Also tested
> the same script on a glibc based machine and it also didn't crash.
$ cd src/musl-1.2.3
$ grep -r clock_gettime
WHATSNEW:- zero-syscall clock_gettime support (dynamic-linked x86_64
only)
WHATSNEW:- vdso clock_gettime/gettimeofday/time acceleration on x86_64
WHATSNEW:- non-working clock_gettime fallback for old kernels
WHATSNEW:- vdso clock_gettime acceleration on i386 (new kernel feature)
WHATSNEW:- vdso clock_gettime on arm
WHATSNEW:- mips vdso clock_gettime support
WHATSNEW:- arm clock_gettime was broken on some hw due to bad time64
vdso
...
could be to "dynamic-linked x86_64 only" mentioned in WHATSNEW.
signature.asc
Description: PGP signature