This commit is contained in:
Nikita Smith
2025-06-25 10:53:24 -07:00
committed by Ryan Fleury
parent 7d77210a5f
commit 32a22779da
4 changed files with 33 additions and 16 deletions
+17 -4
View File
@@ -32,8 +32,21 @@ jobs:
run: | run: |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64 call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
call build ${{ matrix.target }} ${{ matrix.compiler }} ${{ matrix.mode }} || exit /b 1 call build ${{ matrix.target }} ${{ matrix.compiler }} ${{ matrix.mode }} || exit /b 1
- name: run_torture
shell: cmd
if: ${{ matrix.target == 'torture' }}
run: torture -l:radlink || exit /b 1
run-torture:
runs-on: windows-2022
steps:
# - name: Install ASAN
# shell: cmd
# run: |
# "C:\Program Files (x86)\Microsoft Visual Studio\Installer\vs_installer.exe" modify --installPath "C:\Program Files\Microsoft Visual Studio\2022\Enterprise" --quiet --force --norestart --add Microsoft.VisualStudio.Component.VC.ASAN
- name: checkout
uses: actions/checkout@v2
- name: run-torture
shell: cmd
run: |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
call build radlink asan debug no_meta || exit /b 1
call build torture debug no_meta || exit /b 1
cd build
torture -l:radlink || exit /b 1
-1
View File
@@ -315,7 +315,6 @@ CheckNil(nil,p) ? \
#endif #endif
#if ASAN_ENABLED #if ASAN_ENABLED
#pragma comment(lib, "clang_rt.asan-x86_64.lib")
C_LINKAGE void __asan_poison_memory_region(void const volatile *addr, size_t size); C_LINKAGE void __asan_poison_memory_region(void const volatile *addr, size_t size);
C_LINKAGE void __asan_unpoison_memory_region(void const volatile *addr, size_t size); C_LINKAGE void __asan_unpoison_memory_region(void const volatile *addr, size_t size);
# define AsanPoisonMemoryRegion(addr, size) __asan_poison_memory_region((addr), (size)) # define AsanPoisonMemoryRegion(addr, size) __asan_poison_memory_region((addr), (size))
+1 -1
View File
@@ -1084,7 +1084,7 @@ lnk_section_contrib_ptr_is_before(void *raw_a, void *raw_b)
if (a->u.sort_idx_size <= 1 && b->u.sort_idx_size <= 1) { if (a->u.sort_idx_size <= 1 && b->u.sort_idx_size <= 1) {
if (a->u.sort_idx_size == b->u.sort_idx_size) { if (a->u.sort_idx_size == b->u.sort_idx_size) {
cmp = cmp = u32_compar(&a->u.obj_idx, &b->u.obj_idx); cmp = u32_compar(&a->u.obj_idx, &b->u.obj_idx);
if (cmp == 0) { if (cmp == 0) {
cmp = u32_compar(&a->u.obj_sect_idx, &b->u.obj_sect_idx); cmp = u32_compar(&a->u.obj_sect_idx, &b->u.obj_sect_idx);
} }
+15 -10
View File
@@ -149,6 +149,10 @@ t_invoke_linker_with_time_out(U64 time_out, String8 cmdline)
} }
} }
if (g_redirect_stdout) {
os_file_close(output_redirect);
}
scratch_end(scratch); scratch_end(scratch);
return exit_code; return exit_code;
} }
@@ -191,6 +195,16 @@ t_make_file_path(Arena *arena, String8 name)
return push_str8f(arena, "%S\\%S", g_wdir, name); return push_str8f(arena, "%S\\%S", g_wdir, name);
} }
internal B32
t_write_file_list(String8 name, String8List data)
{
Temp scratch = scratch_begin(0,0);
String8 path = t_make_file_path(scratch.arena, name);
B32 is_written = os_write_data_list_to_file_path(path, data);
scratch_end(scratch);
return is_written;
}
internal B32 internal B32
t_write_file(String8 name, String8 data) t_write_file(String8 name, String8 data)
{ {
@@ -203,16 +217,6 @@ t_write_file(String8 name, String8 data)
return t_write_file_list(name, temp_list); return t_write_file_list(name, temp_list);
} }
internal B32
t_write_file_list(String8 name, String8List data)
{
Temp scratch = scratch_begin(0,0);
String8 path = t_make_file_path(scratch.arena, name);
B32 is_written = os_write_data_list_to_file_path(path, data);
scratch_end(scratch);
return is_written;
}
internal String8 internal String8
t_read_file(Arena *arena, String8 name) t_read_file(Arena *arena, String8 name)
{ {
@@ -3531,6 +3535,7 @@ entry_point(CmdLine *cmdline)
fprintf(stdout, " Crashed: %llu\n", crash_count); fprintf(stdout, " Crashed: %llu\n", crash_count);
if (fail_count + crash_count != 0) { if (fail_count + crash_count != 0) {
fflush(stdout);
os_abort(fail_count + crash_count); os_abort(fail_count + crash_count);
} }
} }