Skip to content

[git-webkit] Make the default rebase behavior for git-webkit pr configurable - #295

Merged
webkit-early-warning-system merged 0 commit into
WebKit:mainfrom
JonWBedard:eng/git-webkit-Make-the-default-rebase-behavior-for-git-webkit-pr-configurable
Jun 11, 2022
Merged

webkit-early-warning-system merged 0 commit into
WebKit:mainfrom
JonWBedard:eng/git-webkit-Make-the-default-rebase-behavior-for-git-webkit-pr-configurable

Conversation

@JonWBedard

@JonWBedard JonWBedard commented Apr 15, 2022 •

Copy link
Copy Markdown
Member

b4c270a

[git-webkit] Make the default rebase behavior for `git-webkit pr` configurable
https://bugs.webkit.org/show_bug.cgi?id=239385
<rdar://problem/91811534 >

Reviewed by Dewei Zhu.

* Tools/Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/pull_request.py:
(PullRequest.main): Check the webkitscmpy.auto-rebase-branch option to determine
if we should automatically rebase the branch.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/setup.py:
(Setup.git): Prompt user to set the automatic rebase behavior.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/setup_unittest.py:

Canonical link: https://commits.webkit.org/251475@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@295470 268f45cc-cd09-0410-ab3c-d52691b4dbfc

@JonWBedard JonWBedard self-assigned this Apr 15, 2022
@JonWBedard JonWBedard added Tools / Tests Tools in the Tools directory, build issues, test infrastructure, and bugs in test cases WebKit Nightly Build labels Apr 15, 2022
@JonWBedard
JonWBedard requested a review from graouts April 15, 2022 16:35
@graouts
graouts removed their request for review April 19, 2022 07:31
@graouts

graouts commented Apr 19, 2022

Copy link
Copy Markdown
Contributor

Removed myself as a reviewer, I don't have the required expertise to do so.

@JonWBedard

Copy link
Copy Markdown
Member Author

Removed myself as a reviewer, I don't have the required expertise to do so.

I think the better question for you @graouts is does this change improve your workflow, since you're the one that requested it.

@graouts

graouts commented Apr 20, 2022

Copy link
Copy Markdown
Contributor

If it lets me set a default that calling git webkit pr does not yield a rebase, then the answer is a resounding YES.

@JonWBedard
JonWBedard requested a review from whsieh May 3, 2022 20:08
@mrego

mrego commented May 13, 2022

Copy link
Copy Markdown
Member

Rebasing by default is very time consuming and it's the opposite to the default workflow with webkit-patch, shouldn't we change the default too? Apart from making it configurable?

@JonWBedard
JonWBedard force-pushed the eng/git-webkit-Make-the-default-rebase-behavior-for-git-webkit-pr-configurable branch from 3739c02 to 6a59db8 Compare June 6, 2022 23:51
@marcoscaceres

Copy link
Copy Markdown
Contributor

I found this (automatic rebase) surprising also... any chance we can revive this discussion?... and, ironically, rebase this patch after fixing the style issue 😜

@JonWBedard

Copy link
Copy Markdown
Member Author

I found this (automatic rebase) surprising also... any chance we can revive this discussion?... and, ironically, rebase this patch after fixing the style issue 😜

The style issue is from the unit tests, going to make the code less clear if we try and fix it. Fell off my queue in the last few weeks, but re-pinging reviewers, change still applies and definitely seems relevant for folks making changes to WebCore and code lower in the stack.

@dewei-zhu dewei-zhu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

r=me with comment.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

(args.rebase is None and repository.config().get('pull.rebase')) will always be false as this is in args.rebase is not None: condition.
So we can just do

 rebasing = args.rebase is not None or repository.config().get(
                 'webkitscmpy.auto-rebase-branch',
                 repository.config().get('pull.rebase', 'true'),
             ) == 'true

@JonWBedard
JonWBedard force-pushed the eng/git-webkit-Make-the-default-rebase-behavior-for-git-webkit-pr-configurable branch from 6a59db8 to 476ac03 Compare June 11, 2022 01:24
@JonWBedard JonWBedard added the merge-queue Applied to send a pull request to merge-queue label Jun 11, 2022
@webkit-early-warning-system
webkit-early-warning-system force-pushed the eng/git-webkit-Make-the-default-rebase-behavior-for-git-webkit-pr-configurable branch from 476ac03 to b4c270a Compare June 11, 2022 01:33
@webkit-early-warning-system
webkit-early-warning-system merged commit b4c270a into WebKit:main Jun 11, 2022
@webkit-early-warning-system

Copy link
Copy Markdown
Collaborator

Committed r295470 (251475@main): https://commits.webkit.org/251475@main

Reviewed commits have been landed. Closing PR #295 and removing active labels.

@webkit-early-warning-system webkit-early-warning-system removed the merge-queue Applied to send a pull request to merge-queue label Jun 11, 2022
@JonWBedard
JonWBedard deleted the eng/git-webkit-Make-the-default-rebase-behavior-for-git-webkit-pr-configurable branch June 14, 2022 20:41
dangowrt added a commit to dangowrt/WebKit that referenced this pull request May 27, 2026
https://bugs.webkit.org/show_bug.cgi?id=315509

Reviewed by NOBODY (OOPS!).

The JS-to-wasm trampoline in JSToWasm.cpp handles register-arg shuffling
across three architectures. ARM64 (8 GPR args) and X86_64 (6 GPR args)
have dedicated branches. RISCV64 also has 8 GPR args (regWA0..regWA7,
a0..a7) but was falling through to the generic USE(JSVALUE64) branch
which only handles 6, leaving regWA6 and regWA7 with stale stack
contents on call entry and dropping them on call return.

Symptom: any wasm function whose calling convention places i32/i64
params in a6 or a7 sees garbage for those args. Reproducer is the
JSC wasm-spec "large-sig" function (17 mixed-type params -- locals
14 and 15 land in a6/a7); also propagates to wasm-to-wasm via JS
import (e.g. spec-tests/func.wast.js WebKit#124, memory_trap.wast.js WebKit#295).

Add explicit CPU(RISCV64) branches mirroring the X86_64 form but
covering all 8 GPRs. FPRs already had a combined X86_64||RISCV64
branch covering all 8 FPRs, so no change needed there.

Signed-off-by: Daniel Golle <[email protected]>
dangowrt added a commit to dangowrt/WebKit that referenced this pull request May 27, 2026
https://bugs.webkit.org/show_bug.cgi?id=315509

Reviewed by NOBODY (OOPS!).

Base RISC-V doesn't require stores that fault to be atomic w.r.t. the
fault: hardware may commit some in-bound bytes of a 2/4/8-byte store
before raising the page-fault exception when the access straddles a
page boundary into PROT_NONE memory. SiFive U74 (StarFive JH7110)
does this.

JSC's "fast memory" mode (useWasmFastMemory=true) relies on the
SIGBUS/SIGSEGV handler to convert OOB accesses into wasm traps without
an explicit bounds check. The handler observes the fault and traps the
wasm correctly, but the in-bounds bytes already corrupted by the partial
commit remain in memory. Subsequent reads see wrong data.

Reproducer: spec-tests/memory_trap.wast.js WebKit#295. Test 51 of the same
file does i32.store at offset 65535 (1 in-bound byte, 3 OOB bytes);
expected to trap. The trap fires but byte 65535 gets clobbered to 0
before the fault. Later test WebKit#295 reads i64 at offset 65528 (covering
bytes 65528..65535) and finds 0x0067666564636261 instead of
0x6867666564636261 -- the assertion against the i64 const trips the
wasm "unreachable" guard.

Force-disable useWasmFastMemory on RISCV64; bounds checking falls back
to the explicit BoundsChecking mode in emitCheckAndPreparePointer,
which checks the access upper bound against the memory size before
issuing any load/store.

Signed-off-by: Daniel Golle <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Tools / Tests Tools in the Tools directory, build issues, test infrastructure, and bugs in test cases

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants