1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-22 11:35:06 +00:00
serenity/Meta/Lagom/Tools
DexesTTP 2ab8d474c6 Lagom: Fix leaks in the IDL Wrapper generator
By using RefPtrs to handle interfaces, the IDL parser could store cyclic
references to interfaces that import each other. One main example is the
"EventTarget.idl" and the "AbortSignal.idl" files, which both reference
each other. This caused huge amounts of memory not to be freed on exit.

To fix this, the parsed IDL interfaces are now stored in a HashTable of
NonnullOwnPtr<Interface>, which serves as the sole reference for every
parsed interface. All other usages of the Interface are changed to use
references instead of RefPtrs, or occasionally as raw pointers where
references don't fit inside the data structures.

This new HashTable is static, and as such will automatically be freed
prior to exiting the generator. This ensures that the code generator
properly cleans up after itself.

With this change, The IDL code generators can properly run on Lagom when
compiled with the -DENABLE_ADDRESS_SANITIZER=ON flag, and gets compiled
properly on the CI :^)
2022-05-25 22:25:09 +01:00
..
CodeGenerators Lagom: Fix leaks in the IDL Wrapper generator 2022-05-25 22:25:09 +01:00
ConfigureComponents LibCore+Everywhere: Return ErrorOr from ConfigFile factory methods 2022-02-16 19:49:41 -05:00
IPCMagicLinter Meta: Implement checker for IPC magic number collisions 2021-11-05 00:17:01 +03:30
CMakeLists.txt Meta+Userland: Add jakt as an optional Lagom Tool 2022-05-23 23:05:45 +02:00