Ok, thank you for the tip. I tried building it on Windows, but it apparently needs gcc. Is that so?
2017-07-05 8:08 GMT-03:00 grischka <[email protected]>: > André Willik Valenti wrote: > >> It happened using binaries from >> http://download.savannah.gnu.org/releases/tinycc/. >> > > 0,9,26 is rather old. You might want to try the 'mob' branch > from http://repo.or.cz/w/tinycc.git which we'll use for next > release -- hopefully soon ;) > > -- gr > > > Tried also via libtcc and the same happened: on win32, it works fine; on >> win64, a segfault happens. Here's the code: >> >> >> #include <stdlib.h> >> #include <stdio.h> >> #include <string.h> >> >> #include "libtcc.h" >> >> char my_program[] = "\n"; >> >> int main(int argc, char **argv) >> { >> TCCState *s = tcc_new(); >> tcc_set_output_type(s, TCC_OUTPUT_MEMORY); >> tcc_compile_string(s, my_program); >> tcc_relocate(s, TCC_RELOCATE_AUTO); // <-- segfault here >> return 0; >> } >> >> >> 2017-07-05 0:18 GMT-03:00 André Willik Valenti <[email protected]>: >> >> Hello, >>> >>> I believe I've found a bug. It happens on 64-bit version of tcc for >>> Windows. No problems were found on 32-bit Windows or 64-bit Linux >>> (installed from apt-get). >>> >>> To reproduce, run on a terminal: >>> >>> REM Creates an empty file >>> type nul > empty.c >>> >>> REM win32 tcc works normally >>> win32\tcc empty.c >>> tcc: error: undefined symbol 'main' >>> >>> REM win32 tcc works normally >>> win32\tcc -run empty.c >>> tcc: error: main not defined >>> >>> REM win64 tcc works normally when generating file output >>> win64\tcc empty.c >>> tcc: error: undefined symbol 'main' >>> >>> REM ...but crashes with a segfault when running source code directly >>> win64\tcc -run empty.c >>> >>> >>> The same happens with a file containing just >>> >>> # >>> >>> or >>> >>> #inclu >>> >>> >>> Regards, >>> André >>> >> > _______________________________________________ > 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
