[Gambas-user] News about the new just-in-time compiler

Jussi Lahtinen jussi.lahtinen at gmail.com
Wed Jul 4 00:04:39 CEST 2018


I was in impression that I got unfreed stuff with latest revision, but I
was wrong.
I'm still unable to figure out what crashes the JIT in the big project.

gdb gives me this:

Program received signal SIGSEGV, Segmentation fault.
JIT_load_class (class=class at entry=0x8af89200000009) at jit.c:474
474        if (class->ready || class->in_load)
(gdb) bt
#0  0x00007fffefd55c11 in JIT_load_class (class=class at entry
=0x8af89200000009)
    at jit.c:474
#1  0x00007fffefd55e18 in get_type (n=<optimized out>, n at entry=-3)
    at jit_body.c:314
#2  0x00007fffefd594bc in JIT_translate_body (code=2819) at jit_body.c:1109
#3  0x00007fffefd594bc in JIT_translate_body (func=func at entry=0x8b6668,
ind=ind at entry=4) at jit_body.c:2991
#4  0x00007fffefd55a74 in JIT_translate (index=4, func=0x8b6668) at
jit.c:298
#5  0x00007fffefd55a74 in JIT_translate (name=<optimized out>,
from=from at entry=0x4711fd "") at jit.c:431
#6  0x00007fffefd49a71 in Jit_Translate (_object=<optimized out>,
_param=0x7ffff64d41e0) at main.c:35
#7  0x000000000046169d in EXEC_native () at gbx_exec.c:1355
#8  0x0000000000460550 in EXEC_native_check (defined=1 '\001')
    at gbx_exec.c:1152
#9  0x000000000045425a in EXEC_loop () at gbx_exec_loop.c:1160
#10 0x000000000045f9a4 in EXEC_function_loop () at gbx_exec.c:913
#11 0x000000000045f8cf in EXEC_function_real () at gbx_exec.c:900
#12 0x0000000000462524 in EXEC_public_desc (class=0x69afc8, object=0x0,
desc=0x8a72b8, nparam=1) at gbx_exec.c:1598
#13 0x000000000042adc0 in GB_Call (_func=0x692ad0 <_jit_compile_func>,
nparam=1, release=0) at gbx_api.c:1105
#14 0x0000000000406348 in JIT_compile (arch=0x0) at gbx_jit.c:116

I compiled the interpreter without optimizations, but still there are
missing values.

Meanwhile I did some poking with the GambasTester and I find new crash. See
the attachment.
The class does include "..." argument, but not in the function, which is
compiled with JIT.

These are the problem lines:

Fast Static Public Sub _call() As String

 Return "Called"

End


Jussi



On Tue, Jul 3, 2018 at 11:26 PM, Benoît Minisini <g4mba5 at gmail.com> wrote:

> Le 03/07/2018 à 21:52, Jussi Lahtinen a écrit :
>
>> I have multiple crashes in my big project. I will not send the source,
>> but I will isolate the problem code.
>> However I think I wait until the memory leaks are fixed, since it seems
>> the crashes are not easily tracked right now. The error occurs somewhere
>> much earlier, than what appears to cause the crash.
>>
>>
>> Jussi
>>
>>
> The memory leaks I talked previously were fixed.
>
> To track the crash, run Gambas with valgrind:
>
> $ cd /my/project
> $ GB_JIT_DEBUG=1 GB_JIT_CFLAGS="-O0 -g" valgrind --tool=memcheck
> --num-callers=50 gbx3
>
> Regards,
>
>
> --
> Benoît Minisini
>
> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]----
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gambas-basic.org/pipermail/user/attachments/20180704/084a26d4/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: GambasTestercmd-0.9.49.tar.gz
Type: application/gzip
Size: 26033 bytes
Desc: not available
URL: <https://lists.gambas-basic.org/pipermail/user/attachments/20180704/084a26d4/attachment-0001.gz>


More information about the User mailing list