1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

Boehm-GC: fix global const handling (#9477)

* define global `__v_inside_init`

* unset `__v_inside_init` after `_vinit()`

* define `C.GC_MALLOC_UNCOLLECTABLE()`

* allocate uncollectable memory during `_vinit()`

* ci: run test cases with V copiler that uses GC-Boehm itself

* wrap `__v_inside_init` access into `#ifdef _VGCBOEHM`
This commit is contained in:
Uwe Krüger
2021-03-26 15:44:45 +01:00
committed by GitHub
parent a38fc89150
commit 3220ab7053
6 changed files with 33 additions and 15 deletions

View File

@@ -129,7 +129,9 @@ jobs:
thirdparty/tcc/tcc.exe -version
./v -cg -o v cmd/v # Make sure vtcc can build itself twice
- name: v self compilation with -gc boehm
run: ./v -gc boehm -o v2 cmd/v && ./v2 -gc boehm -o v3 cmd/v && ./v3 -gc boehm -o v4 cmd/v
run: |
./v -gc boehm -o v2 cmd/v && ./v2 -gc boehm -o v3 cmd/v && ./v3 -gc boehm -o v4 cmd/v
mv v4 v
- name: v doctor
run: |
./v doctor
@@ -137,8 +139,7 @@ jobs:
run: |
./v -gc boehm cmd/tools/test_if_v_test_system_works.v
./cmd/tools/test_if_v_test_system_works
- name: Self tests with `-gc boehm`
## The test cases are run with non-gc `v` for now
- name: Self tests with `-gc boehm` with V compiler using Boehm-GC itself
run: ./v -gc boehm -silent test-self
- name: Test leak detector
run: |