Closed Bug 1591945 Opened 5 years ago Closed 5 years ago

Crash in glShaderSource when running webrender tests on emulator

Categories

(Core :: Graphics: WebRender, defect, P3)

Unspecified
Android
defect

Tracking

()

RESOLVED FIXED
mozilla72
Tracking Status
firefox72 --- fixed

People

(Reporter: jnicol, Assigned: jnicol)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Some reftests or crashtests are crashing on the android emulator in glShaderSource() when webrender is enabled. eg https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=272537824&repo=try&lineNumber=4081

glShaderSource has strings and lengths arguments. These are an array of strings which can be concatenated to create the full shader source, and the lengths of these strings. The lengths can be ommitted, in which case it should treat the strings as null-terminated. But in our case we do make use of the lengths argument, and therefore we do not null-terminate the strings. However, it appears the emulator's implementation of glShaderSource assumes that they are null-terminated: https://android.googlesource.com/device/generic/goldfish-opengl/+/refs/heads/master/system/GLESv2_enc/GL2Encoder.cpp#1759.

If we add a null terminator then we avoid the crash.

I'll file this upstream and add a workaround.

Priority: -- → P3

The emulator's implementation of glShaderSource can crash if the source string
are not null-terminated, even though we correctly pass the lengths of the
strings. Work around this by adding a null terminator when running on the
emulator.

Depends on D51293

Pushed by jnicol@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/17366ca83b0c Ensure strings passed to glShaderSource are null-terminated on android emulator. r=gw
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla72
Assignee: nobody → jnicol
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: