Skip to content
This repository was archived by the owner on Sep 11, 2025. It is now read-only.

Fix field alignment issue#393

Merged
mattjohnsonpint merged 2 commits intomainfrom
mjp/hyp-2277-commerce-template-giving-runtime-error-unexpected-null
Sep 26, 2024
Merged

Fix field alignment issue#393
mattjohnsonpint merged 2 commits intomainfrom
mjp/hyp-2277-commerce-template-giving-runtime-error-unexpected-null

Conversation

@mattjohnsonpint
Copy link
Contributor

In Go, a struct's alignment is the maximum of any of its field's alignments. But in AssemblyScript, a class's alignment is always the pointer word size (4 bytes), regardless of its fields.

We had this in the language implementations, but weren't using it correctly in the common langsupport code.

@mattjohnsonpint mattjohnsonpint requested a review from a team September 26, 2024 22:39
@linear
Copy link

linear bot commented Sep 26, 2024

HYP-2277 Commerce template giving runtime error `unexpected null pointer for non-nullable type assembly/types/Product`

Copy
{"level":"error","runtime_version":"v0.12.3","execution_id":"crqs40krs90s73dp3h30","build_id":"crqrptps4qk0eok3r7cg","plugin":"hyper-commerce","error":"unexpected null pointer for non-nullable type assembly/types/Product","function":"getCart","duration_ms":0.546594,"time":"2024-09-26T20:20:18.721Z","message":"Error while executing function."}

@mattjohnsonpint mattjohnsonpint merged commit 4a549ad into main Sep 26, 2024
@mattjohnsonpint mattjohnsonpint deleted the mjp/hyp-2277-commerce-template-giving-runtime-error-unexpected-null branch September 26, 2024 22:43
mattjohnsonpint added a commit that referenced this pull request Sep 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants