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

Apply changes from CSE's current dcc version related to the hack for glib2.27/clang6.0 on 32bit userspace #15

Closed
wants to merge 1 commit into from

Conversation

andrewjbennett
Copy link
Contributor

Not sure whether you're concerned about the repo being up-to-date with what's currently on CSE.

This PR has the patch for the dodgy hack I added to allow dcc to still compile/run when CSE briefly upgraded to glib 2.27 with clang 6.0 where everything exploded.

This patch isn't necessary for older glib versions, or for a 64 bit userspace, and thus hopefully won't be necessary soon, but....

@andrewjbennett
Copy link
Contributor Author

Relevant information from the email thread at that time:


It appears that all programs compiled with dcc crash immediately when you run them.
This also happens for binaries that were compiled with dcc weeks ago (which worked at the time).

Reported by a student on vx3, verified by me on wagner.

z3378327@wagner:~/test$ cat hello.c
#include <stdio.h>
int main(void) {
	printf("Hello!\n");
	return 0;
}
z3378327@wagner:~/test$ dcc -o hello hello.c
z3378327@wagner:~/test$ ./hello
AddressSanitizer:DEADLYSIGNAL
=================================================================
Usage: /home/cs1911/bin/dcc [--valgrind|--memory|--no_explanation] <c-files>


It looks like it's an issue with ASAN and glibc 2.27+

https://reviews.llvm.org/rL334363
google/sanitizers#954


Yep it's an ASAN library issue

weill:~% echo "int main(void) {}"|clang -fsanitize=address -x c - &&./a.out
AddressSanitizer:DEADLYSIGNAL
=================================================================
==24744==ERROR: AddressSanitizer: SEGV on unknown address 0xf779e430 (pc 0xf779e444 bp 0xffa7ba6c sp 0xffa7ba2c T16777215)
==24744==The signal is caused by a WRITE memory access.
    #0 0xf779e443 in _dl_get_tls_static_info (/lib/ld-linux.so.2+0x12443)
    #1 0x8159e89 in __sanitizer::InitTlsSize() (/tmp_amd/adams/export/adams/1/andrewt/a.out+0x8159e89)
    #2 0x813ed32 in __asan::AsanInitInternal() [clone .part.3] (/tmp_amd/adams/export/adams/1/andrewt/a.out+0x813ed32)
    #3 0xf779beda  (/lib/ld-linux.so.2+0xfeda)
    #4 0xf778d299  (/lib/ld-linux.so.2+0x1299)

Last night, Libc6 got a modest update and Clang was upgraded from v4 to v6. (GCC also upgraded v7 -> v8)

Those changed together because those bundles from Debian Testing are compiled to work together.


The previous libc6 set (v 2.26 replacing v2.27) is deployed back just about everywhere now.

@andrewjbennett andrewjbennett changed the title apply changes from CSE's current dcc version related to the hack for glib2.27/clang6.0 on 32bit userspace Apply changes from CSE's current dcc version related to the hack for glib2.27/clang6.0 on 32bit userspace Oct 26, 2018
@comp1511 comp1511 closed this Feb 28, 2019
@andrewjbennett andrewjbennett deleted the cse-latest-glibc-version-hack branch June 23, 2019 08:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants