[LLVMbugs] [Bug 24294] New: gcda writer is not big-endian safe
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Tue Jul 28 16:03:09 PDT 2015
https://llvm.org/bugs/show_bug.cgi?id=24294
Bug ID: 24294
Summary: gcda writer is not big-endian safe
Product: compiler-rt
Version: unspecified
Hardware: All
OS: FreeBSD
Status: NEW
Severity: normal
Priority: P
Component: compiler-rt
Assignee: unassignedbugs at nondot.org
Reporter: chmeeedalf at gmail.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
GCDAProfiling.c writes out magic numbers as little-endian byte strings, but
reads them back as native-endian integers. For example, (r241824) line 371
has:
val = read_32bit_value();
While line 398 has:
write_bytes("\0\0\xa1\1", 4);
When reading on a big-endian platform, this would read back as 0x0000a101,
which would obviously fail the check on line 375.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20150728/05bdc4c5/attachment.html>
More information about the llvm-bugs
mailing list