[FS#544] kmodloader segfault on ixp4xx (armeb)
LEDE Bugs
lede-bugs at lists.infradead.org
Tue Feb 21 09:09:35 PST 2017
A new Flyspray task has been opened. Details are below.
User who did this - Ted Hess (thess)
Attached to Project - LEDE Project
Summary - kmodloader segfault on ixp4xx (armeb)
Task Type - Bug Report
Category - Toolchain
Status - New
Assigned To -
Operating System - All
Severity - Critical
Priority - High
Reported Version - All
Due in Version - Undecided
Due Date - Undecided
Details - I believe this issue to be a really obscure endian problem which may be more toolchain related than a raw software bug in the source code. I've tried to work-around this issue with code changes, but the problem persists. I give up...
Inside the routine 'alloc_module' the following code produces the wrong result -- specifically byte-swapped pointers in the '_aliases' array.
char **_aliases;
...
char *ptr = (char *)_aliases + naliases * sizeof(_aliases[0]);
int len;
i = 0;
do {
len = strlen(aliases[i]) + 1;
memcpy(ptr, aliases[i], len);
_aliases[i] = ptr;
More information about the lede-bugs
mailing list