Skip to content

Work around ANGLE bug in glGetDebugMessageLog#233

Merged
emilio merged 2 commits intoservo:mainfrom
jamienicol:get-debug-message-log-angle
Jun 17, 2025
Merged

Work around ANGLE bug in glGetDebugMessageLog#233
emilio merged 2 commits intoservo:mainfrom
jamienicol:get-debug-message-log-angle

Conversation

@jamienicol
Copy link
Contributor

ANGLE has a bug where it may return one too many messages from glGetDebugMessageLog.

Reported upstream here: https://issues.angleproject.org/issues/425579207

To avoid this, ensure the buffers we provide to the function have a capacity one greater than the count we provide. This shouldn't have any negative effect on other drivers, so I think it's okay to apply this workaround universally.

ANGLE can return one more message than specified by the provided count
argument. This results in an out of bounds panic in gleam.

https://issues.angleproject.org/issues/425579207

To avoid this, ensure the provided buffers are one larger than the
requested count. As an additional precaution, stop blindly trusting
that the returned count is smaller to or equal than the buffers'
capacities.
@emilio emilio added this pull request to the merge queue Jun 17, 2025
Merged via the queue into servo:main with commit e7b3f32 Jun 17, 2025
4 checks passed
@jamienicol jamienicol deleted the get-debug-message-log-angle branch June 17, 2025 15:59
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.

2 participants