Commit Graph
141 Commits
Author SHA1 Message Date
Fernando Nunes a5e80c7530 fix(checker): record instantiated poly proc on selector when used as a proc value 2026-09-25 07:45:33 -03:00
Michael Lehenauer 39d00f6ee4 Fix Windows AMD64 no-CRT stack probe support 2026-09-22 20:32:58 +02:00
alyekypo 23cc994255 fix(checker): keep entity iteration valid across a scope map rehash
`check_scope_decls` iterates a scope's entity map while
`check_entity_decl` can insert into that same scope: a procedure alias
(`f :: e`) goes through `override_entity_in_scope`, which calls
`scope_map_insert`. The map grows at 75% load (12 of 16 slots, then 24
of 32), and `scope_map_insert` grows before it probes for the key, so
even an alias that only replaces an existing value rehashes and
reallocates the table in the middle of the iteration.

`ScopeMapIterator` re-read its map on every step while `end` had
captured the capacity at loop start, so the walk continued over the new
table under the old sentinel: it ran past the end of the reallocated
table and dereferenced whatever followed it as an `Entity *` - a nullptr
dereference for a procedure scope holding exactly 12 or 24 entities - or
it stopped at the stale end index and silently skipped every declaration
that the rehash had moved behind it, which left unused declarations
without any diagnostic at all.

The iterator now snapshots the table pointer and capacity when it is
constructed, so iteration is invariant under any insert or grow and
cannot leave the table it began on. A scope that does not grow behaves
exactly as before: the snapshot points at the same table.

Refs #7598
2026-09-21 13:13:39 +00:00
Senthilnathan 699973abd6 Merge branch 'master' into fix/location-global-initializer 2026-09-16 18:45:52 +05:30
Senthilnathan ed2d5304d1 fix: #location in global variable initializers 2026-09-16 18:42:10 +05:30
Jeroen van Rijn 0251becedb Revert #6476
PR #6476 "fixed" an issue that didn't exist because it misunderstood this allocator's semantics. What it conluded was an edge case was in fact entirely predictable and desireable behavior for this allocator.

In "fixing" this edge case, it prevented the exact scratch mechanics that sets this allocator apart for its use case.

Reverted.
2026-09-04 23:23:26 +02:00
leo119 24cb1abf29 checker: Do not deduplicate cases in tagless switches
Tagless switch cases are ordered predicates, so distinct constant conditions may fold to the same Boolean value. Restrict duplicate-case tracking to explicitly tagged switches and add positive and negative regression coverage for issue #7421.
2026-08-27 14:53:54 +08:00
gingerBill 34643f30d9 Merge branch 'master' into const_array_broadcast 2026-08-26 08:45:51 +01:00
gingerBill d06ac2fe64 Merge pull request #7428 from mocompute/check-7336
add regression test for #7336
2026-08-26 08:43:06 +01:00
gingerBill dcb66ab09d Merge branch 'master' into const_array_broadcast 2026-08-26 08:42:51 +01:00
gingerBill 7bd6d16d76 Merge pull request #7438 from kalsprite/asm_doc_category
Give asm templates a documentation category instead of a blank header and a null `%s`
2026-08-26 08:41:20 +01:00
kalsprite c3bc5b69ac Merge branch 'master' into asm_doc_category 2026-08-25 23:08:48 -07:00
kalsprite c1aeb47ce5 swizzle target multi-assignment 2026-08-25 22:22:33 -07:00
kalsprite ae549bf34b broadcast a constant into every array level 2026-08-25 21:47:02 -07:00
mo 2d1253e3e6 add regression test for #7336
Closes #7336.
Fixed by #7327.
2026-08-26 15:08:01 +12:00
gingerBill 2214d90997 Merge branch 'master' into bool_comparison_normalise 2026-08-25 15:31:19 +01:00
gingerBill 771cbfa31a Merge pull request #7439 from ssenthilnathan3/fix/proc-literal-type-canonicalization
Fix canonical names for types in procedure literals
2026-08-25 15:12:32 +01:00
Senthilnathan 559ed487e6 fix: canonical names for types in procedure literals 2026-08-25 14:41:48 +05:30
kalsprite 4ecaa7dfd9 normalize bool cmp 2026-08-24 18:34:59 -07:00
Jeroen van Rijn 66f9dbca8a Merge branch 'master' into bool_be_conversion 2026-08-24 18:31:30 -07:00
kalsprite c3bfbea235 big endian bool cmp 2026-08-24 18:15:01 -07:00
kalsprite 301baf0b88 remove faulty tests 2026-08-24 17:46:55 -07:00
gingerBill 805fc07854 Fix indentation of run.sh 2026-08-24 14:13:28 +01:00
gingerBill cebceb9bb2 Merge branch 'master' into asm_rip_width 2026-08-24 09:31:54 +01:00
gingerBill 48daf8e511 Merge pull request #7431 from kalsprite/asm_named_register_slot
Reject asm operands in slots only a named hardware register can fill
2026-08-24 09:30:20 +01:00
kalsprite b875baea08 asm template doc category 2026-08-24 00:55:16 -07:00
kalsprite 40fd892cf5 Reject a named asm template used as a value instead of aborting the compiler 2026-08-24 00:27:26 -07:00
kalsprite b6c64c28b5 Diagnose in an asm template instead of aborting with SIGILL 2026-08-23 22:36:57 -07:00
kalsprite deb45f3e6a asm named slots 2026-08-23 21:34:31 -07:00
gingerBill fff69510b9 Merge pull request #7412 from mocompute/fix-7008
fix incorrect offset_of and size_of for unions with cyclic pointers
2026-08-23 10:52:14 +01:00
Jeroen van Rijn 2370de888c Merge branch 'master' into type_call_null_arg 2026-08-22 03:12:01 +02:00
kalsprite c29596e88f fix test typo 2026-08-21 17:59:02 -07:00
kalsprite ef1c5fe675 Fix compiler segfault on a bare in a type position call 2026-08-21 17:54:13 -07:00
kalsprite f8bdfa0857 Fix segfault comparing two foreign declarations of the same symbol 2026-08-21 17:31:42 -07:00
mo 7bb0bc353f add regression test for incorrect offset_of 2026-08-22 11:12:11 +12:00
Michael Tesař 6fadf91c84 add windows test 2026-08-21 19:20:11 +02:00
Michael Tesař b6c90b18dd fix failing tests 2026-08-21 19:18:25 +02:00
Michael Tesar 7d02788257 Fix reordered compound literal comparison 2026-08-21 00:46:47 +02:00
Senthilnathan f6f686392a Merge branch 'master' into fix/recursive-soa-sigbus 2026-08-17 12:53:33 +05:30
Senthilnathan 4fe5719007 Fix SIGBUS/segfault when compiling recursive #soa slice/dynamic array types 2026-08-17 12:48:41 +05:30
Michael Tesař b17c10162d Fix bit_set upper endpoint representability check 2026-08-16 00:30:42 +02:00
kalsprite a3573c83cd fix long -> int64_t for win64 2026-08-12 18:52:33 -07:00
kalsprite 2285f4e061 sysv abi 2026-08-11 16:53:57 -07:00
kalsprite 1a631b2f3f Fix constant string16 carrying UTF-8, and inverted slice indices reaching substring (#7268)
* str16 fix

* remove stale call
2026-08-09 21:22:13 +02:00
Michael Tesař 60061fe4ba Register issue 7012 regression test 2026-08-09 00:15:46 +02:00
Michael Tesař d01ec95ebe Create regression test 2026-08-09 00:01:14 +02:00
Jeroen van Rijn e140512954 Update test_issue_7188.odin
Add missing commas.
2026-08-07 20:05:53 +02:00
Isabella Basso e94d3d4871 llvm: handle #soa fixed compound literals for vars 2026-08-06 16:43:52 -03:00
gingerBill cce7159a55 Merge pull request #7208 from Taylbr/poly-proc-fix
Fix: Polymorphic procedures resolving to nil + further fixes
2026-08-05 16:56:34 +02:00
gingerBill cd1e8293d7 Merge pull request #7185 from subotac/fix/variadic-tuple-arguments
fix: pack tuple results into variadic arguments
2026-08-05 16:56:24 +02:00