  let view;
  try {
    view = new Uint8Array(new WebAssembly.Memory({ initial: SIZE / PAGE }).buffer);
  } catch (e) {
    testPassed(`Allocating ${SIZE} threw: ${e}`);
    return;
  }

  let expectedData = new Uint8Array([1, 2, 3, 4]);

  let buf = gl.createBuffer();
  gl.bindBuffer(gl.ARRAY_BUFFER, buf);
  gl.bufferData(gl.ARRAY_BUFFER, expectedData, gl.STATIC_DRAW);

  const length = expectedData.length;
  const offset = SIZE - length;
  try {
    gl.getBufferSubData(gl.ARRAY_BUFFER, 0, view, offset, le