Mike Pall
fb22d0f80f
FFI: Drop finalizer table rehash after GC cycle.
...
Reported by Sergey Kaplun. #1247
2024-08-19 20:00:21 +02:00
Mike Pall
fddc9650d8
Merge branch 'master' into v2.1
2024-08-19 16:22:55 +02:00
Mike Pall
5ca25ee83e
Correctly close VM state after early OOM during open.
...
Reported by Assumeru. #1248
2024-08-19 16:14:55 +02:00
Mike Pall
f5affaa6c4
FFI: Turn FFI finalizer table into a proper GC root.
...
Reported by Sergey Bronnikov. #1168
2024-04-19 01:33:19 +02:00
Mike Pall
913df6a945
Merge branch 'master' into v2.1
2024-03-10 17:26:03 +01:00
Mike Pall
dda1ac273a
FFI: Treat cdata finalizer table as a GC root.
...
Thanks to Sergey Bronnikov. #1168
2024-03-10 17:16:41 +01:00
Mike Pall
ef587afb2c
Merge branch 'master' into v2.1
2023-08-20 21:33:37 +02:00
Mike Pall
158a284cc9
Bump copyright date.
2023-08-20 21:25:30 +02:00
Mike Pall
1c27912705
Print errors from __gc finalizers instead of rethrowing them.
...
Finalizers are not supposed to throw errors -- this is undefined behavior.
Lua 5.1 - 5.3 and (previously) LuaJIT rethrow the error. This randomly
breaks some unrelated code that just happens to do an allocation. Bad.
Lua 5.4 catches the error and emits a warning instead. But warnings are
not enabled by default, so it fails silently. Even worse.
LuaJIT (now) catches the error and emits a VM event. The default event
handler function prints "ERROR in finalizer: ...".
Set a custom handler function with: jit.attach(handler, "errfin")
2023-04-16 18:13:48 +02:00
Mike Pall
a7d0265480
Improve GC estimation for userdata with attached managed memory.
...
This works well for string.buffers, but not for userdata or
cdata with attached unmanaged memory (malloc/free, mmap/munmap).
2022-07-28 15:40:28 +02:00
Mike Pall
7306ba78d6
Merge branch 'master' into v2.1
2022-01-15 19:42:30 +01:00
Mike Pall
c4dfb625ba
Bump copyright date.
2022-01-15 19:30:54 +01:00
Mike Pall
15ed84bd49
String buffers, part 4a: Add metatable serialization dictionary.
...
Sponsored by fmad.io.
2021-08-12 21:27:58 +02:00
Mike Pall
ac02a120ef
String buffers, part 2e: add serialization string dictionary.
...
Sponsored by fmad.io.
2021-06-07 12:03:22 +02:00
Mike Pall
a119497bec
String buffers, part 2d: basic string buffer methods.
...
Sponsored by fmad.io.
2021-06-01 05:16:32 +02:00
Mike Pall
1e66d0f9e6
Merge branch 'master' into v2.1
2021-01-02 21:56:07 +01:00
Mike Pall
f47c864b01
Bump copyright date.
2021-01-02 21:49:41 +01:00
Mike Pall
ff34b48ddd
Redesign and harden string interning.
...
Up to 40% faster on hash-intensive benchmarks.
With some ideas from Sokolov Yura.
2020-06-23 03:06:45 +02:00
Mike Pall
8ae5170cdc
Improve assertions.
2020-06-15 02:52:00 +02:00
Mike Pall
87b111f0fe
Merge branch 'master' into v2.1
2020-01-20 23:34:21 +01:00
Mike Pall
38a5ed4b43
Bump copyright date.
2020-01-20 23:26:51 +01:00
Mike Pall
54484e257f
Minor fixes.
2020-01-20 22:20:55 +01:00
Mike Pall
92fa45f9eb
Fix interaction between profiler hooks and finalizers.
...
Thanks to Julien Desgats.
2019-12-08 19:56:56 +01:00
Mike Pall
d3e36e7920
Merge branch 'master' into v2.1
2017-03-08 23:04:46 +01:00
Mike Pall
3ab9f5a18d
Remove internal __mode = "K" and replace with safe check.
2017-03-08 22:03:17 +01:00
Mike Pall
71ff7ef8a7
Merge branch 'master' into v2.1
2017-01-17 12:41:05 +01:00
Mike Pall
b93a1dd0c8
Bump copyright date to 2017.
2017-01-17 12:35:03 +01:00
Mike Pall
3f43f09413
Merge branch 'master' into v2.1
2016-10-13 18:38:22 +02:00
Mike Pall
a68c411857
Fix GC step size calculation.
...
Thanks to Igor Ehrlich.
2016-10-13 18:37:58 +02:00
Mike Pall
7fb75ccc4c
Embed 64 bit constants directly in the IR, using two slots.
...
Contributed by Peter Cawley.
2016-05-23 00:25:29 +02:00
Mike Pall
f4231949b5
Merge branch 'master' into v2.1
2016-03-03 12:11:37 +01:00
Mike Pall
db1b399af1
Bump copyright date to 2016.
2016-03-03 12:02:22 +01:00
Mike Pall
a3a6866d4c
Re-enable trace stitching.
...
Thanks to Vyacheslav Egorov.
2015-08-29 23:24:26 +02:00
Mike Pall
0a5045c34e
Merge branch 'master' into v2.1
2015-01-06 00:12:45 +01:00
Mike Pall
86913b9bbf
Bump copyright date to 2015.
2015-01-05 23:59:31 +01:00
Mike Pall
054e6abe37
Add LJ_FR2 mode: Two-slot frame info.
2015-01-03 15:04:38 +01:00
Mike Pall
6e9145a882
Cleanup of memory vs. GC sizes. No functional changes.
2014-12-20 00:17:50 +01:00
Mike Pall
c8d1aff0ba
Merge branch 'master' into v2.1
2014-04-22 11:29:05 +02:00
Mike Pall
2715fe3aee
Prevent GC estimate miscalculation due to buffer growth.
2014-04-22 11:26:52 +02:00
Mike Pall
a9d4543601
Merge branch 'master' into v2.1
2014-01-16 23:18:34 +01:00
Mike Pall
ef59e54820
Bump copyright date to 2014.
2014-01-16 23:10:16 +01:00
Mike Pall
b00a0260dd
Merge branch 'master' into v2.1
2013-11-22 05:14:37 +01:00
Mike Pall
9d90988347
Follow-up fix for GC step threshold fix.
2013-11-22 05:13:13 +01:00
Mike Pall
8a2b2beac2
Merge branch 'master' into v2.1
2013-11-05 19:46:41 +01:00
Mike Pall
8941b1994e
Fix for last commit
2013-11-05 19:45:04 +01:00
Mike Pall
5c55b766bd
Merge branch 'master' into v2.1
2013-11-05 19:41:21 +01:00
Mike Pall
7b4d5306c7
Fix GC steps threshold handling when called by JIT-compiled code.
...
Thanks to Cheng, Long.
2013-11-05 19:36:59 +01:00
Mike Pall
d0b48ec996
Merge branch 'master' into v2.1
2013-10-14 19:34:06 +02:00
Mike Pall
5d25645a21
FFI: Rehash finalizer table after GC cycle, if needed.
2013-10-14 19:31:24 +02:00
Mike Pall
517500ba48
Save currently executing lua_State in g->cur_L.
...
This is only a good approximation due to deficiencies in the design of
the Lua/C API. It indicates _some_ valid state that is/was executing.
Also reorder L->cframe stores to achieve a synchronously consistent state.
2013-08-30 23:38:17 +02:00