diff options
-rw-r--r-- | runtime/stpd/ChangeLog | 5 | ||||
-rw-r--r-- | runtime/stpd/symbols.c | 6 |
2 files changed, 8 insertions, 3 deletions
diff --git a/runtime/stpd/ChangeLog b/runtime/stpd/ChangeLog index 15f151ba..2a45cdce 100644 --- a/runtime/stpd/ChangeLog +++ b/runtime/stpd/ChangeLog @@ -1,3 +1,8 @@ +2006-11-15 Martin Hunt <hunt@redhat.com> + + * symbols.c (do_kernel_symbols): Add sizeof(long) to sym_base + to preserve 64-bit alignment. + 2006-11-09 Martin Hunt <hunt@redhat.com> * librelay.c: Change all references to transport messages diff --git a/runtime/stpd/symbols.c b/runtime/stpd/symbols.c index 7138e17c..2f964866 100644 --- a/runtime/stpd/symbols.c +++ b/runtime/stpd/symbols.c @@ -141,7 +141,7 @@ void do_kernel_symbols(void) struct _stp_symbol *syms; int num_syms, i = 0; - sym_base = malloc(MAX_SYMBOLS*sizeof(struct _stp_symbol)+sizeof(int)); + sym_base = malloc(MAX_SYMBOLS*sizeof(struct _stp_symbol)+sizeof(long)); data_base = malloc(MAX_SYMBOLS*32); if (data_base == NULL || sym_base == NULL) { fprintf(stderr,"Failed to allocate memory for symbols\n"); @@ -152,7 +152,7 @@ void do_kernel_symbols(void) datamax = dataptr + MAX_SYMBOLS*32 - sizeof(int); *(int *)sym_base = STP_SYMBOLS; - syms = (struct _stp_symbol *)(sym_base + sizeof(int)); + syms = (struct _stp_symbol *)(sym_base + sizeof(long)); kallsyms = fopen ("/proc/kallsyms", "r"); if (!kallsyms) { @@ -200,7 +200,7 @@ void do_kernel_symbols(void) send_request(STP_SYMBOLS, buf, 8); /* send syms */ - send_data(sym_base, num_syms*sizeof(struct _stp_symbol)+sizeof(int)); + send_data(sym_base, num_syms*sizeof(struct _stp_symbol)+sizeof(long)); /* send data */ send_data(data_base, dataptr-data+sizeof(int)); |