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 extensions loading and parsing #448

Merged
merged 2 commits into from
Dec 31, 2023
Merged

Fix extensions loading and parsing #448

merged 2 commits into from
Dec 31, 2023

Conversation

lephilousophe
Copy link
Contributor

This fixes issue #446 by being more flexible when parsing extensions.
If the array version is available, it is used, else, it falls back on space separated string.

In addition, if the implementation doesn't have any extension, parsing doesn't fail anymore and if malloc fails, extensions parsing fails.

Use NULL as array terminator and don't store the count of extensions
anymore
Copy link
Owner

@Dav1dde Dav1dde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, actually gets rid of some complexity!

I left one comment which, I think, might lead us to free random addresses.

glad/generator/c/templates/gl.c Show resolved Hide resolved
@Dav1dde Dav1dde added the bug label Dec 26, 2023
Check if functions are usable and fallback on old method if they are
not.
@Dav1dde Dav1dde merged commit 73eaae0 into Dav1dde:glad2 Dec 31, 2023
1 check passed
@lephilousophe
Copy link
Contributor Author

I fixed the test failure (superfluous comma) and all tests now build fine.

@lephilousophe lephilousophe deleted the fix-exts branch December 31, 2023 10:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants