-
Notifications
You must be signed in to change notification settings - Fork 1k
Closed
Description
This sort of code is not portable and tends to not work on RISC processors:
case BSER_INT16:
*val = *(int16_t*)(buf+1);
return 1;
case BSER_INT32:
*val = *(int32_t*)(buf+1);
return 1;
case BSER_INT64:
*val = *(int64_t*)(buf+1);
return 1;It fails with bus errors on SPARC, for example, when the alignment isn't correct.
- bser_real(), bunser() - dereferences double pointer of unknown alignment
- bser_int(), bunser_int() - dereferences 16-bit, 32-bit, and 64-bit integer pointers of unknown alignment
Metadata
Metadata
Assignees
Labels
No labels