Skip to content

wine's kernel32/time test fails with clang, passes with gcc #8455

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

Closed
llvmbot opened this issue Sep 5, 2010 · 3 comments
Closed

wine's kernel32/time test fails with clang, passes with gcc #8455

llvmbot opened this issue Sep 5, 2010 · 3 comments
Labels
bugzilla Issues migrated from bugzilla clang Clang issues not falling into any other category invalid Resolved as invalid, i.e. not a bug

Comments

@llvmbot
Copy link
Member

llvmbot commented Sep 5, 2010

Bugzilla Link 8083
Resolution INVALID
Resolved on Sep 06, 2010 13:55
Version 2.7
OS Linux
Attachments source example
Reporter LLVM Bugzilla Contributor
CC @asl

Extended Description

From http://bugs.winehq.org/show_bug.cgi?id=24270.

I've narrowed the case down a bit, but it's still in the form of a wine test. Hopefully it'll give you a starting point though. If I can provide any more information, please let me know.

Clang used:
austin@midna:~/wine-clang/dlls/kernel32/tests$ clang --version
clang version 1.1 (branches/release_27)
Target: x86_64-pc-linux-gnu
Thread model: posix

Same test passes with:
austin@midna:~/wine-clang/dlls/kernel32/tests$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/x86_64-unknown-linux-gnu/4.6.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ./configure --enable-languages=c,c++
Thread model: posix
gcc version 4.6.0 20100821 (experimental) (GCC)

stripped down testcase attached.

On clang, make time.ok gives:
../../../tools/runtest -q -P wine -M kernel32.dll -T ../../.. -p kernel32_test.exe.so time.c && touch time.ok
time.c:96: Test failed: Test SystemTimeToTzSpecificLocalTime #​3. Got 2004-03-02 02:00. Expect hour = 03
time.c:96: Test failed: Test SystemTimeToTzSpecificLocalTime #​3. Got 2004-03-02 02:00. Expect hour = 03
time.c:96: Test failed: Test SystemTimeToTzSpecificLocalTime #​1. Got 2004-03-02 02:00. Expect hour = 01
time.c:96: Test failed: Test SystemTimeToTzSpecificLocalTime #​2. Got 2004-03-02 02:00. Expect hour = 01
time.c:96: Test failed: Test SystemTimeToTzSpecificLocalTime #​3. Got 2004-03-02 02:00. Expect hour = 03
time.c:96: Test failed: Test SystemTimeToTzSpecificLocalTime #​3. Got 2004-03-17 02:00. Expect hour = 03
make: *** [time.ok] Error 6

on gcc, passes without error.

@asl
Copy link
Collaborator

asl commented Sep 5, 2010

In the current form the testcase is pretty useless:

  1. Please provide a preprocessed source of the test. If possible, try to reduce it.
  2. Please provide a way how the test can be executed standalone or with minimal set of tool involved.

Thanks!

@llvmbot
Copy link
Member Author

llvmbot commented Sep 6, 2010

clang -m32 -E output
Here's the preprocessed file (from -E). I'll work on reducing it down further.

@llvmbot
Copy link
Member Author

llvmbot commented Sep 6, 2010

Turns out wine was trying to access a member of an array beyond the defined end. Gcc was allowing it, clang wasn't, but it's undefined behavior.

Invalid, sorry for the spam.

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 3, 2021
augusto2112 pushed a commit to augusto2112/llvm-project that referenced this issue Mar 22, 2024
Skip 32 bit relocation addend partitioning in MCCAS.
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla clang Clang issues not falling into any other category invalid Resolved as invalid, i.e. not a bug
Projects
None yet
Development

No branches or pull requests

2 participants