1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00
v/vlib/builtin
Davide Beatrici c9a5896468
bultin: always enable GC_THREADS, even with -d dynamic_boehm, otherwise multithread operation is unsafe (#15275)
According to upstream documentation, only GC_WIN32_THREADS is explicit.

This PR fixes a random memory corruption(s) with "-d dynamic_boehm" on OpenMandriva.
1679adc04d.log
```
DEBUG: + VFLAGS='-prod -d dynamic_boehm'
DEBUG: + /usr/bin/clang -Os -fomit-frame-pointer -g3 -gdwarf-4 -Wstrict-aliasing=2 -pipe -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fstack-protector-all --param=ssp-buffer-size=4 -m64 -mtune=generic -flto -std=gnu99 -w -o tmp_1 v.c -lm -lpthread -Os -fomit-frame-pointer -g3 -gdwarf-4 -Wstrict-aliasing=2 -pipe -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fstack-protector-all --param=ssp-buffer-size=4 -m64 -mtune=generic -flto -Wl,-O2 -Wl,--no-undefined -flto
DEBUG: + ./tmp_1 -no-parallel -o tmp_2 -prod -d dynamic_boehm cmd/v
DEBUG: + ./tmp_2 -o v -prod -d dynamic_boehm cmd/v
DEBUG: /var/tmp/rpm-tmp.mcjmqc: line 52:   644 Bus error               (core dumped) ./v build-tools
```
2022-07-30 14:59:12 +03:00
..
js all: wrap up unsafe { nil } (p. 3) 2022-07-21 21:01:30 +03:00
linux_bare all: wrap up unsafe { nil } (p. 3) 2022-07-21 21:01:30 +03:00
wasm_bare all: wrap up unsafe { nil } (p. 3) 2022-07-21 21:01:30 +03:00
array_d_gcboehm_opt.v all: wrap up unsafe { nil } (p. 3) 2022-07-21 21:01:30 +03:00
array_notd_gcboehm_opt.v builtin: add drafts for __new_array_noscan, __new_array_with_default_noscan, __new_array_with_array_default_noscan for array_notd_gcboehm_opt.v 2022-07-12 10:00:58 +03:00
array_shrinkage_test.v builtin: support a.flags.set(.noslices | .noshrink), use it in the particles example (#13818) 2022-03-24 23:37:13 +02:00
array_test.v cgen: fix array init with it (fix #14679) (#14680) 2022-06-05 19:41:54 +03:00
array.c.v
array.v all: voidptr(0) => unsafe { nil } (p.2) 2022-07-21 20:51:54 +03:00
builtin_android_outside_termux.c.v android: provide more predictable logging, add comptime termux support (#14984) 2022-07-07 18:28:29 +03:00
builtin_backtraces_d_musl.c.v builtin: improve musl/Alpine support (define weak backtrace/backtrace_symbols/backtrace_symbols_fd symbols) (#14250) 2022-05-03 09:17:53 +03:00
builtin_backtraces_nix.c.v builtin: improve musl/Alpine support (define weak backtrace/backtrace_symbols/backtrace_symbols_fd symbols) (#14250) 2022-05-03 09:17:53 +03:00
builtin_d_gcboehm.c.v bultin: always enable GC_THREADS, even with -d dynamic_boehm, otherwise multithread operation is unsafe (#15275) 2022-07-30 14:59:12 +03:00
builtin_d_use_libbacktrace.c.v ci: vfmt builtin_d_use_libbacktrace.c.v 2022-05-17 19:41:57 +03:00
builtin_ios.c.v
builtin_nix.c.v vfmt: voidptr(0) => unsafe { nil } (p.1) 2022-07-21 20:46:01 +03:00
builtin_notd_gcboehm.c.v all: replace "NB:" with "Note:" (docs/comments) 2022-03-06 20:01:22 +03:00
builtin_notd_use_libbacktrace.c.v builtin: print libbacktrace output to stderr, on panics/segfault crash (#14434) 2022-05-17 14:56:34 +03:00
builtin_test.v builtin: add libbacktrace as option for generating stack traces (#14277) 2022-05-04 21:17:05 +03:00
builtin_windows.c.v checker: improve unused label check 2022-07-23 01:36:27 +03:00
builtin.c.v all: wrap up unsafe { nil } (p. 3) 2022-07-21 21:01:30 +03:00
builtin.v builtin: print libbacktrace output to stderr, on panics/segfault crash (#14434) 2022-05-17 14:56:34 +03:00
byte_test.v all: byte => u8 2022-04-15 14:58:56 +03:00
cfns_wrapper.c.v builtin: improve support for large arrays ([]int{len: 1_000_000_000} now works), fix an arr.repeat() bug (#14294) 2022-05-04 18:42:06 +03:00
cfns.c.v android: provide more predictable logging, add comptime termux support (#14984) 2022-07-07 18:28:29 +03:00
chan.v
float_test.v all: replace "NB:" with "Note:" (docs/comments) 2022-03-06 20:01:22 +03:00
float_x64.v all: update copyright year 2022-01-04 12:21:12 +03:00
float.c.v all: update copyright year 2022-01-04 12:21:12 +03:00
gated_array_string_test.v all: support slices with negative indexes #[start..end] (gated arrays) (#12914) 2021-12-22 16:34:02 +03:00
int_test.v ci: add test_byte_vs_u8 to int_test.v 2022-04-15 21:42:07 +03:00
int.v vfmt: voidptr(0) => unsafe { nil } (p.1) 2022-07-21 20:46:01 +03:00
isnil_test.v all: wrap up unsafe { nil } (p. 3) 2022-07-21 21:01:30 +03:00
map_d_gcboehm_opt.v all: byte => u8 2022-04-15 14:58:56 +03:00
map_of_floats_test.v
map_test.v all: wrap up unsafe { nil } (p. 3) 2022-07-21 21:01:30 +03:00
map.c.v all: byte => u8 2022-04-15 14:58:56 +03:00
map.v all: wrap up unsafe { nil } (p. 3) 2022-07-21 21:01:30 +03:00
option.c.v builtin: change IError msg and code to methods + fix vlib, add a deprecation notice for the old usages (#13041) 2022-02-11 15:52:33 +02:00
option.v markused: add _result_ok (#14495) 2022-05-22 14:52:38 +03:00
prealloc.c.v all: wrap up unsafe { nil } (p. 3) 2022-07-21 21:01:30 +03:00
README.md builtin: add more documentation (#13160) 2022-01-14 17:27:38 +02:00
rune_test.v all: byte => u8 2022-04-15 14:58:56 +03:00
rune.v all: byte => u8 2022-04-15 14:45:52 +03:00
sorted_map.v all: byte => u8 2022-04-15 14:58:56 +03:00
sorting_test.v preludes,builder,cgen: add support for VTEST_RUNNER=tap and -test-runner tap (#12523) 2021-12-16 15:59:46 +02:00
string_charptr_byteptr_helpers.v all: replace []byte with []u8 2022-04-15 15:35:35 +03:00
string_int_test.v builtin: add a string.parse_int/2 method (wrapping strconv.parse_int/3) (#13164) 2022-01-14 00:31:11 +02:00
string_interpolation.v builtin: minor cleanup in string_interpolation.v (#14471) 2022-05-20 14:19:27 +03:00
string_match_glob_test.v all: replace "NB:" with "Note:" (docs/comments) 2022-03-06 20:01:22 +03:00
string_strip_margin_test.v all: update copyright year 2022-01-04 12:21:12 +03:00
string_test.v builtin: add string.replace_char and string.normalize_tabs (#15239) 2022-07-27 22:04:39 +03:00
string.v fmt: fix interface method with fntype argument (#15280) 2022-07-30 14:29:41 +03:00
utf8_test.v builtin: use a pure V version of string.to_wide() on != windows (#13314) 2022-01-28 20:41:50 +02:00
utf8.c.v all: byte => u8 2022-04-15 14:58:56 +03:00
utf8.v builtin: add string.len_utf8() method (#14208) 2022-04-29 10:23:57 +03:00

Description:

builtin is a module that is implicitly imported by every V program.

It implements the builtin V types array, string, map.

It also implements builtin functions like println, eprintln, malloc, panic, print_backtrace.

The autogenerated documentation for builtin functions is lacking, so for these functions, please refer to the official V documentation.