Skip to content

v8 bug fixes for s390x #22364

@john-yan

Description

@john-yan

Please backport https://chromium-review.googlesource.com/c/v8/v8/+/1176424 to fix high 32 bit corruption issue which leading to seg fault crash in v8 on this test case:

simpleRandomString = function (size) {
  let ret = '';
  const ids = 'abcdefghijkmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';    // <- this fails on Z
  for (let i = 0; i < size; i++) {
      let rand = Math.random ();
      console.log ('1 rand', rand);
      let numb = rand * ids.length;
      console.log ('2 numb', numb);
      let pos = Math.floor (numb);
      console.log ('3 pos', pos, typeof pos, ids.length);
      let id = ids[pos];        // <- RANDOM seg faults here
      console.log ('4 id', id);
      ret += id;
      console.log ('5 ret', ret);
    }
  return ret;
};

for (let i = 100000; i >= 0; i--) {                             // loop de loop
    let rand = simpleRandomString (2);  // call the troublesome function
    console.log ('iters left', i, ' word:', rand, '\n');
}

console.log ('success');

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions