Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

standalone_test_cases.stack_iterator tests fail on Gentoo Linux x86_64 #19944

Open
BratishkaErik opened this issue May 11, 2024 · 1 comment
Open
Labels
bug Observed behavior contradicts documented or intended behavior

Comments

@BratishkaErik
Copy link
Contributor

Zig Version

0.12.0 and master

Steps to Reproduce and Observed Behavior

Run zig build and zig build test with following arguments (simplified, but same result, full log attached in the end):

./stage3/bin/zig build test -j6 -Dtarget=native -Dcpu=native --verbose --summary all --zig-lib-dir /bla_bla/zig/lib/ -Dversion-string=0.12.0 -Dstatic-llvm=false -Dno-langref -Dstd-docs=false -Dskip-non-native -Denable-llvm=true -Dconfig_h=build/config.h --release=fast

Failures:

slices differ. first difference occurs at index 1 (0x1)

============ expected this output: =============  len: 4 (0x4)

[0]: 16816811
[1]: 16816811
[2]: 16813193
[3]: 16813193

============= instead found this: ==============  len: 4 (0x4)

[0]: 16816811
[1]: 16813193
[2]: 16812322
[3]: 1

================================================

error: TestExpectedEqual
test
└─ test-standalone
   └─ standalone_test_cases
      └─ standalone_test_cases.stack_iterator
         └─ run unwind_fp failure
error: the following command exited with error code 1:
/var/tmp/portage/dev-lang/zig-0.12.0/temp/zig-local-cache/o/07574276c805fb61d3f4bc0140c13658/unwind_fp


# ...

slices differ. first difference occurs at index 1 (0x1)

============ expected this output: =============  len: 4 (0x4)

[0]: 16818124
[1]: 16818124
[2]: 16814539
[3]: 16814539

============= instead found this: ==============  len: 4 (0x4)

[0]: 16818124
[1]: 16814539
[2]: 16813698
[3]: 1

================================================

error: TestExpectedEqual
test
└─ test-standalone
   └─ standalone_test_cases
      └─ standalone_test_cases.stack_iterator
         └─ run unwind_nofp failure
error: the following command exited with error code 1:
/var/tmp/portage/dev-lang/zig-0.12.0/temp/zig-local-cache/o/9318a7e614a23dd918e6960f6d514fb9/unwind_nofp

# ...

slices differ. first difference occurs at index 1 (0x1)

============ expected this output: =============  len: 5 (0x5)

[0]: 16809170
[1]: 16809170
[2]: 16809170
[3]: 16809170
[4]: 16809170

============= instead found this: ==============  len: 5 (0x5)

[0]: 16809170
[1]: 140018662989610
[2]: 140018664751152
[3]: 310
[4]: 294

================================================

error: TestExpectedEqual
test
└─ test-standalone
   └─ standalone_test_cases
      └─ standalone_test_cases.stack_iterator
         └─ run shared_lib_unwind failure
error: the following command exited with error code 1:
/var/tmp/portage/dev-lang/zig-0.12.0/temp/zig-local-cache/o/b68d785abbb4d9b41d665a1ea3d74838/shared_lib_unwind

# ...

├─ test-standalone transitive failure
│  └─ standalone_test_cases transitive failure
│     ├─ standalone_test_cases.simple success
│     │  ├─ zig build-exe hello Debug native success 1s MaxRSS:193M
│     │  ├─ zig build-exe hello ReleaseSafe native success 9s MaxRSS:189M
│     │  ├─ zig build-exe hello ReleaseFast native success 9s MaxRSS:192M
│     │  ├─ zig build-exe hello ReleaseSmall native success 376ms MaxRSS:161M
│     │  ├─ zig build-exe hello_libc Debug native success 2s MaxRSS:208M
│     │  ├─ zig build-exe hello_libc ReleaseSafe native success 10s MaxRSS:201M
│     │  ├─ zig build-exe hello_libc ReleaseFast native success 227ms MaxRSS:161M
│     │  ├─ zig build-exe hello_libc ReleaseSmall native success 228ms MaxRSS:161M
# ...
│     ├─ standalone_test_cases.stack_iterator transitive failure
│     │  ├─ run unwind_fp failure
│     │  │  └─ zig build-exe unwind_fp ReleaseFast native success 9s MaxRSS:195M
│     │  ├─ run unwind_nofp failure
│     │  │  └─ zig build-exe unwind_nofp ReleaseFast native success 10s MaxRSS:194M
│     │  └─ run shared_lib_unwind failure
│     │     └─ zig build-exe shared_lib_unwind ReleaseFast native success 11s MaxRSS:191M
│     │        ├─ zig build-lib c_shared_lib ReleaseFast native success 269ms MaxRSS:158M
│     │        └─ WriteFile cached

Expected Behavior

Pass the test.

Build log attached:
build.log

@BratishkaErik BratishkaErik added the bug Observed behavior contradicts documented or intended behavior label May 11, 2024
@BratishkaErik
Copy link
Contributor Author

Just tested again on 0.13.0, here's command:

zig build test-standalone -Dtarget=native -Dcpu=native -Dskip-non-native --release=[mode]

This test fails with ReleaseSafe, ReleaseFast and ReleaseSmall, but succeeds in Debug mode (--release=off). Additionaly, ReleaseSmall fails another test standalone_test_cases.compiler_rt_panic:

test-standalone
└─ standalone_test_cases
   └─ standalone_test_cases.compiler_rt_panic
      └─ CheckObject failure
error: no symbol table found
thread 29882 panic: failed to openSelfDebugInfo
Unable to dump stack trace: debug info stripped
# --release=safe
# --release=fast
test-standalone transitive failure
└─ standalone_test_cases transitive failure
   └─ standalone_test_cases.stack_iterator transitive failure
      ├─ run unwind_fp failure
      ├─ run unwind_nofp failure
      └─ run shared_lib_unwind failure

# --release=small
test-standalone transitive failure
└─ standalone_test_cases transitive failure
   ├─ standalone_test_cases.stack_iterator transitive failure
   │  ├─ run unwind_fp failure
   │  ├─ run unwind_nofp failure
   │  └─ run shared_lib_unwind failure
   └─ standalone_test_cases.compiler_rt_panic transitive failure
      └─ CheckObject failure

# --release=off
(success)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Observed behavior contradicts documented or intended behavior
Projects
None yet
Development

No branches or pull requests

1 participant