wcc/ww: dotbaseaddr #128b probe gates on an untyped module-qualifier inner

The probe accepted any inner ident, hijacking same-leaf locals as a
module qualifier; gate on the untyped(module) inner only (mirror the
cstage twin). Review item #20; dual-stage rows red-proven.
This commit is contained in:
2026-06-12 09:06:51 +09:00
parent 4961a91d14
commit 94bfca761c
5 changed files with 225 additions and 24 deletions

View File

@@ -258,6 +258,7 @@ TESTS = $(BIN)/test_smoke $(BIN)/test_lex $(BIN)/test_parse $(BIN)/test_check \
$(BIN)/test_globslicefield_run \
$(BIN)/test_globstrslice_run \
$(BIN)/test_globtagisas_run \
$(BIN)/test_dotbasehijack_run \
$(BIN)/test_arr_ptr_global \
$(BIN)/test_def_arr_infer_len \
$(BIN)/test_def_arr_len \
@@ -747,6 +748,16 @@ $(BIN)/test_globtagisas_run: test/wcc/989_globtagisas_run.c \
$(LIB)/libwwrt.a | $(BIN)
$(CC) $(CFLAGS) -o $@ $<
# 989_dotbasehijack_run (F8-c4, #20): indexing an [N]T field of a module-
# global struct must not be hijacked by an unrelated global sharing the
# field's name. Builds+runs on BOTH driver twins (rule-10); align-UP.
$(BIN)/test_dotbasehijack_run: test/wcc/989_dotbasehijack_run.c \
$(BIN)/ww $(BIN)/ww_ww \
$(BIN)/w6c $(BIN)/w6a $(BIN)/w6l \
$(BIN)/w6c_ww $(BIN)/w6a_ww $(BIN)/w6l_ww \
$(LIB)/libwwrt.a | $(BIN)
$(CC) $(CFLAGS) -o $@ $<
$(BIN)/test_let_global: test/wcc/630_let_global.c $(BIN)/ww $(BIN)/w6c \
$(BIN)/w6a $(BIN)/w6l $(LIB)/libwwrt.a | $(BIN)
$(CC) $(CFLAGS) -o $@ $<