summaryrefslogtreecommitdiff
path: root/mysys/stacktrace.c
diff options
context:
space:
mode:
authorDavi Arnaut <davi.arnaut@oracle.com>2010-11-30 21:20:32 -0200
committerDavi Arnaut <davi.arnaut@oracle.com>2010-11-30 21:20:32 -0200
commit2f0c4841a4c5837b2c2ba4f2e9748e2378ad32de (patch)
tree86c9a95627a645a28558c75c7bc725e2b7349e07 /mysys/stacktrace.c
parentcfe8acb19870cb82b4508d208e5df8525536a46d (diff)
parentcd504e49bcece187dee85b33e39f72b5eab53cda (diff)
downloadmariadb-git-2f0c4841a4c5837b2c2ba4f2e9748e2378ad32de.tar.gz
Merge of mysql-5.1-bugteam into mysql-5.5-bugteam.
Diffstat (limited to 'mysys/stacktrace.c')
-rw-r--r--mysys/stacktrace.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/mysys/stacktrace.c b/mysys/stacktrace.c
index ed3a15ae27e..48cdaaa6c91 100644
--- a/mysys/stacktrace.c
+++ b/mysys/stacktrace.c
@@ -84,8 +84,11 @@ static int safe_print_str(const char *addr, int max_len)
if ((fd= open(buf, O_RDONLY)) < 0)
return -1;
+ /* Ensure that off_t can hold a pointer. */
+ compile_time_assert(sizeof(off_t) >= sizeof(intptr));
+
total= max_len;
- offset= (off_t) addr;
+ offset= (intptr) addr;
/* Read up to the maximum number of bytes. */
while (total)