From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7781 invoked by alias); 12 Nov 2012 20:44:35 -0000 Received: (qmail 7754 invoked by uid 48); 12 Nov 2012 20:44:23 -0000 From: "hjl.tools at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug other/55292] New: libsanitizer doesn't support x32 Date: Mon, 12 Nov 2012 20:44:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: other X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: hjl.tools at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2012-11/txt/msg01060.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55292 Bug #: 55292 Summary: libsanitizer doesn't support x32 Classification: Unclassified Product: gcc Version: 4.8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: other AssignedTo: unassigned@gcc.gnu.org ReportedBy: hjl.tools@gmail.com sanitizer_common/sanitizer_linux.cc has void *internal_mmap(void *addr, uptr length, int prot, int flags, int fd, u64 offset) { #if __WORDSIZE == 64 return (void *)syscall(__NR_mmap, addr, length, prot, flags, fd, offset); #else return (void *)syscall(__NR_mmap2, addr, length, prot, flags, fd, offset); #endif } uptr internal_filesize(fd_t fd) { #if __WORDSIZE == 64 struct stat st; if (syscall(__NR_fstat, fd, &st)) return -1; #else struct stat64 st; if (syscall(__NR_fstat64, fd, &st)) return -1; #endif return (uptr)st.st_size; } They are incorrect for x32.