Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F152886665
D1967.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D1967.diff
View Options
Index: head/contrib/libcxxrt/dwarf_eh.h
===================================================================
--- head/contrib/libcxxrt/dwarf_eh.h
+++ head/contrib/libcxxrt/dwarf_eh.h
@@ -218,15 +218,17 @@
static uint64_t read_value(char encoding, dw_eh_ptr_t *data)
{
enum dwarf_data_encoding type = get_encoding(encoding);
- uint64_t v;
switch (type)
{
// Read fixed-length types
#define READ(dwarf, type) \
case dwarf:\
- v = static_cast<uint64_t>(*reinterpret_cast<type*>(*data));\
- *data += sizeof(type);\
- break;
+ {\
+ type t;\
+ memcpy(&t, *data, sizeof t);\
+ *data += sizeof t;\
+ return static_cast<uint64_t>(t);\
+ }
READ(DW_EH_PE_udata2, uint16_t)
READ(DW_EH_PE_udata4, uint32_t)
READ(DW_EH_PE_udata8, uint64_t)
@@ -237,15 +239,11 @@
#undef READ
// Read variable-length types
case DW_EH_PE_sleb128:
- v = read_sleb128(data);
- break;
+ return read_sleb128(data);
case DW_EH_PE_uleb128:
- v = read_uleb128(data);
- break;
+ return read_uleb128(data);
default: abort();
}
-
- return v;
}
/**
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Apr 18, 7:03 PM (13 h, 44 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31730006
Default Alt Text
D1967.diff (1 KB)
Attached To
Mode
D1967: Attempt to make libcxxrt's dwarf_eh work with strict alignment
Attached
Detach File
Event Timeline
Log In to Comment