Commit 26ff25c
committed
fix: tinyobjloader ODR violation unmasked by tonight's CI-red fixes
Real windows-2022 + Clang ASan+UBSan CI evidence landed after tonight's
6 CI-red fixes: mc3togltf.exe now starts on Windows and the 3
load_policy tests pass, confirming those fixes work. But clearing the
mc3_json_document_budget timeout let the Linux sanitizer job's
standalone-component loop reach mc3togltf's own tests for the first
time ever, and ~67 of 75 crashed instantly with an AddressSanitizer
odr-violation on tinyobj::MaterialFileReader's typeinfo.
Root cause: mc3togltf/src/MeshBuilder.cpp defines
TINYOBJLOADER_IMPLEMENTATION and #includes tiny_obj_loader.h directly,
compiling its own copy of tinyobjloader into mc3togltf_lib -- while
mc3togltf_lib (and the root editor target) ALSO linked the
separately-compiled `tinyobjloader` CMake target, which builds as a
shared library for the same Manifold BUILD_SHARED_LIBS=ON default
already identified as the Windows DLL-staging bug. Two live
definitions of the same class/vtable in one process is genuine
undefined behavior, not an ASan nitpick -- it was always latent, just
never reached in CI before (the loop always died earlier at mc3's own
timeout).
Fixed by dropping the tinyobjloader *link* dependency everywhere
(mc3togltf_lib, both branches of the root editor target's
target_link_libraries, and the release-artifact DLL/shared-library
install loop) -- only the include directory is needed since
MeshBuilder.cpp already provides the sole implementation.
Verified: standalone mc3togltf rebuilt under Clang ASan+UBSan matching
CI's exact flags -- 75/78 pass (up from 8/78), remaining 3 are the
already-known Blender/numpy gap. Full root MeshCraft editor still
links/runs (--version works), and OBJ import specifically
(mc3togltf_obj_material_import/_obj_robustness/_large_obj_stress) still
passes end to end.1 parent f72f90b commit 26ff25c
3 files changed
Lines changed: 73 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
467 | 467 | | |
468 | 468 | | |
469 | 469 | | |
470 | | - | |
471 | | - | |
| 470 | + | |
| 471 | + | |
472 | 472 | | |
473 | | - | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
474 | 478 | | |
475 | 479 | | |
476 | 480 | | |
| |||
655 | 659 | | |
656 | 660 | | |
657 | 661 | | |
658 | | - | |
659 | 662 | | |
660 | 663 | | |
661 | 664 | | |
662 | 665 | | |
663 | 666 | | |
664 | 667 | | |
665 | | - | |
| 668 | + | |
666 | 669 | | |
667 | 670 | | |
668 | 671 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
227 | 227 | | |
228 | 228 | | |
229 | 229 | | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
230 | 275 | | |
231 | 276 | | |
232 | 277 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
113 | 112 | | |
114 | 113 | | |
115 | 114 | | |
| |||
146 | 145 | | |
147 | 146 | | |
148 | 147 | | |
149 | | - | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
150 | 159 | | |
151 | 160 | | |
152 | 161 | | |
| |||
0 commit comments