Skip to content
Browse files

Print NULL for zero address in sys_mmap64

2012-02-02  H.J. Lu  <hongjiu.lu@intel.com>

	* mem.c (sys_mmap64): Print NULL for zero address.
  • Loading branch information...
1 parent 03aefda commit a2301e620941212fbed03f1e10506c1b583fbcc5 @hjl-tools committed
Showing with 7 additions and 1 deletion.
  1. +3 −0 ChangeLog.hjl
  2. +4 −1 mem.c
View
3 ChangeLog.hjl
@@ -0,0 +1,3 @@
+2012-02-02 H.J. Lu <hongjiu.lu@intel.com>
+
+ * mem.c (sys_mmap64): Print NULL for zero address.
View
5 mem.c
@@ -360,7 +360,10 @@ sys_mmap64(struct tcb *tcp)
#endif /* linux */
/* addr */
- tprintf("%#lx, ", u_arg[0]);
+ if (!u_arg[0])
+ tprintf("NULL, ");
+ else
+ tprintf("%#lx, ", u_arg[0]);
/* len */
tprintf("%lu, ", u_arg[1]);
/* prot */

0 comments on commit a2301e6

Please sign in to comment.
Something went wrong with that request. Please try again.