Skip to content

Commit 86f5d65

Browse files
committed
NetBSD src for "user", checkout.sh rev f9c874f7c4343260791efe4129630bb8b61c4339
1 parent 67873a3 commit 86f5d65

File tree

5 files changed

+473
-74
lines changed

5 files changed

+473
-74
lines changed

external/bsd/libc++/dist/libcxxrt/src/auxhelper.cc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,3 +75,8 @@ extern "C" void __cxa_deleted_virtual()
7575
{
7676
abort();
7777
}
78+
79+
extern "C" void __cxa_throw_bad_array_new_length()
80+
{
81+
throw std::bad_array_new_length();
82+
}

external/bsd/libc++/dist/libcxxrt/src/dwarf_eh.h

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -218,15 +218,17 @@ static int64_t read_sleb128(dw_eh_ptr_t *data)
218218
static uint64_t read_value(char encoding, dw_eh_ptr_t *data)
219219
{
220220
enum dwarf_data_encoding type = get_encoding(encoding);
221-
uint64_t v;
222221
switch (type)
223222
{
224223
// Read fixed-length types
225224
#define READ(dwarf, type) \
226225
case dwarf:\
227-
v = static_cast<uint64_t>(*reinterpret_cast<type*>(*data));\
228-
*data += sizeof(type);\
229-
break;
226+
{\
227+
type t;\
228+
memcpy(&t, *data, sizeof t);\
229+
*data += sizeof t;\
230+
return static_cast<uint64_t>(t);\
231+
}
230232
READ(DW_EH_PE_udata2, uint16_t)
231233
READ(DW_EH_PE_udata4, uint32_t)
232234
READ(DW_EH_PE_udata8, uint64_t)
@@ -237,15 +239,11 @@ static uint64_t read_value(char encoding, dw_eh_ptr_t *data)
237239
#undef READ
238240
// Read variable-length types
239241
case DW_EH_PE_sleb128:
240-
v = read_sleb128(data);
241-
break;
242+
return read_sleb128(data);
242243
case DW_EH_PE_uleb128:
243-
v = read_uleb128(data);
244-
break;
244+
return read_uleb128(data);
245245
default: abort();
246246
}
247-
248-
return v;
249247
}
250248

251249
/**

0 commit comments

Comments
 (0)