Actions
Bug #237
closedMake sure that a trace with a source architecture page size of 4 kiB can be opened/read with Babeltrace on a system with 64 kiB pages
Start date:
05/14/2012
Due date:
% Done:
0%
Estimated time:
Description
Babeltrace uses mmap()
to read traces and the file offset
of mmap()
must be a multiple of the system page size. Babeltrace maps the input files per-packet, giving mmap()
the packet size as the mapping length:
pos->base = mmap(NULL, pos->packet_size / CHAR_BIT, pos->prot, pos->flags, pos->fd, pos->mmap_offset);
If a system with a page size of 4 kiB is traced and its viewer using Babeltrace is on a system with 64 kiB pages, most packets (except those aligned on a multiple of 65536) will probably make mmap()
return MAP_FAILED
and set errno
to EINVAL
, which will clearly crash the app. as it is currently implemented.
Actions