RFR: 8264449: Enable reproducible builds with SOURCE_DATE_EPOCH [v5]
John Neffenger
jgneff at openjdk.java.net
Mon Nov 22 21:28:11 UTC 2021
On Sat, 18 Sep 2021 15:15:10 GMT, Kevin Rushforth <kcr at openjdk.org> wrote:
> I did a CI build yesterday and again today on all three platforms and compared the sdk between the two builds for each platform. On all three platforms the results are the same: All files were identical except the native jfxwebkit library. So there is something in the WebKit build that is affected by an external input (perhaps the system date or similar).
I can recreate this difference, but only on macOS.
**Lesson learned:** When testing reproducible builds on a permanent system, never use the Gradle Daemon!
I always get a different `libjfxwebkit.dylib` file when I run the build with `bash gradlew --no-daemon`. Shown below are the versions of the compilers I'm using:
john at linux:~$ gcc --version
gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0
john at macos:~$ gcc --version
Apple clang version 13.0.0 (clang-1300.0.29.3)
john at win10:~$ gcc --version
gcc (GCC) 11.2.0
When I dump each of the shared libraries with the following script, I get a text file with 10,413,716 lines, yet there are only 108 lines different between the two output files.
#!/bin/bash
# Dumps macOS shared libraries
# Diffoscope fails due to missing '=' after '--arch-name' option:
# llvm-objdump: error: unknown argument '--arch-name'
llvm-objdump --arch-name=x86_64 --section="__TEXT,__text" --macho \
--demangle --no-leading-addr --no-show-raw-insn "$@"
The differences are shown below:
diff --git a/libjfxwebkit.5.txt b/libjfxwebkit.6.txt
index 9d6932a..63f2b70 100644
--- a/libjfxwebkit.5.txt
+++ b/libjfxwebkit.6.txt
@@ -1,4 +1,4 @@
-libjfxwebkit.5.dylib:
+libjfxwebkit.6.dylib:
Contents of (__TEXT,__text) section
__ZN6WebKit15StorageAreaImplD2Ev:
pushq %rbp
@@ -881412,30 +881412,22 @@ __ZN7WebCore30isCSSPropertyEnabledBySettingsENS_13CSSPropertyIDEPKNS_8SettingsE:
movq %rsp, %rbp
movb $1, %al
testq %rsi, %rsi
- je 0x319ee0
+ je 0x319ee7
leal -258(%rdi), %ecx
cmpw $37, %cx
- ja 0x319eb7
+ ja 0x319eb2
movzwl %cx, %ecx
- leaq 79(%rip), %rdx
+ leaq 75(%rip), %rdx
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
movb 466(%rsi), %al
- andb $4, %al
- shrb $2, %al
- popq %rbp
- retq
+ jmp 0x319ee2
+ cmpw $43, %di
+ je 0x319edc
movzwl %di, %ecx
cmpl $366, %ecx
- je 0x319ed5
- cmpw $43, %di
- jne 0x319ee0
- movb 451(%rsi), %al
- andb $4, %al
- shrb $2, %al
- popq %rbp
- retq
+ jne 0x319ee7
movb 454(%rsi), %al
andb $32, %al
shrb $5, %al
@@ -881446,46 +881438,52 @@ __ZN7WebCore30isCSSPropertyEnabledBySettingsENS_13CSSPropertyIDEPKNS_8SettingsE:
shrb %al
popq %rbp
retq
+ movb 451(%rsi), %al
+ andb $4, %al
+ shrb $2, %al
+ popq %rbp
+ retq
+ nopl (%rax)
+ .long 4294967230 @ KIND_JUMP_TABLE32
+ .long 4294967230 @ KIND_JUMP_TABLE32
+ .long 4294967230 @ KIND_JUMP_TABLE32
+ .long 4294967291 @ KIND_JUMP_TABLE32
+ .long 4294967291 @ KIND_JUMP_TABLE32
+ .long 4294967291 @ KIND_JUMP_TABLE32
+ .long 4294967291 @ KIND_JUMP_TABLE32
+ .long 4294967291 @ KIND_JUMP_TABLE32
+ .long 4294967291 @ KIND_JUMP_TABLE32
+ .long 4294967291 @ KIND_JUMP_TABLE32
+ .long 4294967291 @ KIND_JUMP_TABLE32
+ .long 4294967291 @ KIND_JUMP_TABLE32
+ .long 4294967291 @ KIND_JUMP_TABLE32
+ .long 4294967291 @ KIND_JUMP_TABLE32
+ .long 4294967291 @ KIND_JUMP_TABLE32
+ .long 4294967291 @ KIND_JUMP_TABLE32
+ .long 4294967291 @ KIND_JUMP_TABLE32
+ .long 4294967291 @ KIND_JUMP_TABLE32
+ .long 4294967291 @ KIND_JUMP_TABLE32
+ .long 4294967291 @ KIND_JUMP_TABLE32
+ .long 4294967291 @ KIND_JUMP_TABLE32
+ .long 4294967291 @ KIND_JUMP_TABLE32
+ .long 4294967291 @ KIND_JUMP_TABLE32
+ .long 4294967291 @ KIND_JUMP_TABLE32
+ .long 4294967291 @ KIND_JUMP_TABLE32
+ .long 4294967291 @ KIND_JUMP_TABLE32
+ .long 4294967291 @ KIND_JUMP_TABLE32
+ .long 4294967291 @ KIND_JUMP_TABLE32
+ .long 4294967291 @ KIND_JUMP_TABLE32
+ .long 4294967291 @ KIND_JUMP_TABLE32
+ .long 4294967291 @ KIND_JUMP_TABLE32
+ .long 4294967291 @ KIND_JUMP_TABLE32
+ .long 4294967255 @ KIND_JUMP_TABLE32
+ .long 4294967291 @ KIND_JUMP_TABLE32
+ .long 4294967291 @ KIND_JUMP_TABLE32
+ .long 4294967291 @ KIND_JUMP_TABLE32
+ .long 4294967255 @ KIND_JUMP_TABLE32
+ .long 4294967268 @ KIND_JUMP_TABLE32
+ nopw %cs:(%rax,%rax)
nop
- .long 4294967226 @ KIND_JUMP_TABLE32
- .long 4294967226 @ KIND_JUMP_TABLE32
- .long 4294967226 @ KIND_JUMP_TABLE32
- .long 4294967280 @ KIND_JUMP_TABLE32
- .long 4294967280 @ KIND_JUMP_TABLE32
- .long 4294967280 @ KIND_JUMP_TABLE32
- .long 4294967280 @ KIND_JUMP_TABLE32
- .long 4294967280 @ KIND_JUMP_TABLE32
- .long 4294967280 @ KIND_JUMP_TABLE32
- .long 4294967280 @ KIND_JUMP_TABLE32
- .long 4294967280 @ KIND_JUMP_TABLE32
- .long 4294967280 @ KIND_JUMP_TABLE32
- .long 4294967280 @ KIND_JUMP_TABLE32
- .long 4294967280 @ KIND_JUMP_TABLE32
- .long 4294967280 @ KIND_JUMP_TABLE32
- .long 4294967280 @ KIND_JUMP_TABLE32
- .long 4294967280 @ KIND_JUMP_TABLE32
- .long 4294967280 @ KIND_JUMP_TABLE32
- .long 4294967280 @ KIND_JUMP_TABLE32
- .long 4294967280 @ KIND_JUMP_TABLE32
- .long 4294967280 @ KIND_JUMP_TABLE32
- .long 4294967280 @ KIND_JUMP_TABLE32
- .long 4294967280 @ KIND_JUMP_TABLE32
- .long 4294967280 @ KIND_JUMP_TABLE32
- .long 4294967280 @ KIND_JUMP_TABLE32
- .long 4294967280 @ KIND_JUMP_TABLE32
- .long 4294967280 @ KIND_JUMP_TABLE32
- .long 4294967280 @ KIND_JUMP_TABLE32
- .long 4294967280 @ KIND_JUMP_TABLE32
- .long 4294967280 @ KIND_JUMP_TABLE32
- .long 4294967280 @ KIND_JUMP_TABLE32
- .long 4294967280 @ KIND_JUMP_TABLE32
- .long 4294967269 @ KIND_JUMP_TABLE32
- .long 4294967280 @ KIND_JUMP_TABLE32
- .long 4294967280 @ KIND_JUMP_TABLE32
- .long 4294967280 @ KIND_JUMP_TABLE32
- .long 4294967269 @ KIND_JUMP_TABLE32
- .long 4294967282 @ KIND_JUMP_TABLE32
- nopl (%rax,%rax)
__ZN7WebCore15getPropertyNameENS_13CSSPropertyIDE:
leal -2(%rdi), %eax
movzwl %ax, %eax
@bmwiedemann Bernhard, does this look familiar? It appears to be similar to the [problem you fixed in WebKit][1] (twice).
[1]: https://github.com/WebKit/WebKit/commits?author=bmwiedemann
-------------
PR: https://git.openjdk.java.net/jfx/pull/446
More information about the openjfx-dev
mailing list