Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix type cast for normalizing alter subscription statement #223

Merged
merged 1 commit into from
Dec 2, 2023

Conversation

anuraaga
Copy link
Contributor

@anuraaga anuraaga commented Dec 1, 2023

I am compiling this library to WebAssembly and ran into this issue. This test failed for me

https://github.com/pganalyze/libpg_query/blob/15-latest/test/normalize_tests.c#L30

The bug is obvious, though I'm not sure what it is about the WebAssembly toolchain that causes it to break vs how these tests are normally run, it could be the usage of musl as libc or just the LLVM Wasm backend itself.

@lfittl
Copy link
Member

lfittl commented Dec 1, 2023

Good catch!

I suspect this might be a struct alignment detail that behaves differently in the WASM toolchain, thus causing a problem only in that case. It was by sheer luck that this worked otherwise.

@lfittl lfittl merged commit 867b65f into pganalyze:15-latest Dec 2, 2023
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants