Skip to content

Commit

Permalink
Print NULL for zero address in sys_mmap64
Browse files Browse the repository at this point in the history
2012-02-02  H.J. Lu  <hongjiu.lu@intel.com>

	* mem.c (sys_mmap64): Print NULL for zero address.
  • Loading branch information
hjl-tools committed Feb 2, 2012
1 parent 03aefda commit a2301e6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions 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.
5 changes: 4 additions & 1 deletion mem.c
Expand Up @@ -360,7 +360,10 @@ sys_mmap64(struct tcb *tcp)
#endif /* linux */ #endif /* linux */


/* addr */ /* addr */
tprintf("%#lx, ", u_arg[0]); if (!u_arg[0])
tprintf("NULL, ");
else
tprintf("%#lx, ", u_arg[0]);
/* len */ /* len */
tprintf("%lu, ", u_arg[1]); tprintf("%lu, ", u_arg[1]);
/* prot */ /* prot */
Expand Down

0 comments on commit a2301e6

Please sign in to comment.