summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhunt <hunt>2006-11-15 17:54:56 +0000
committerhunt <hunt>2006-11-15 17:54:56 +0000
commit42c808f9b3c9f39c213c4d2799714627c57d7b9f (patch)
tree8fd017f70a452a9de965ce77733c5812a7c04f17
parent07c66d4067739f4b5090143c2fdc97dd0b9ee922 (diff)
downloadsystemtap-steved-42c808f9b3c9f39c213c4d2799714627c57d7b9f.tar.gz
systemtap-steved-42c808f9b3c9f39c213c4d2799714627c57d7b9f.tar.xz
systemtap-steved-42c808f9b3c9f39c213c4d2799714627c57d7b9f.zip
2006-11-15 Martin Hunt <hunt@redhat.com>
* symbols.c (do_kernel_symbols): Add sizeof(long) to sym_base to preserve 64-bit alignment.
-rw-r--r--runtime/stpd/ChangeLog5
-rw-r--r--runtime/stpd/symbols.c6
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));