aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libpipe/pq.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/libpipe/pq.c b/libpipe/pq.c
index fff03e67..069b41bc 100644
--- a/libpipe/pq.c
+++ b/libpipe/pq.c
@@ -410,7 +410,13 @@ packet_fetch (struct packet *packet,
/* Just copy the data the old fashioned way.... */
{
if (*data_len < amount)
- *data = mmap (0, amount, PROT_READ|PROT_WRITE, MAP_ANON, 0, 0);
+ {
+ *data = mmap (0, amount, PROT_READ|PROT_WRITE, MAP_ANON, 0, 0);
+ if (*data == MAP_FAILED)
+ assert_perror_backtrace (errno);
+ else
+ assert_backtrace (*data);
+ }
memcpy (*data, start, amount);
start += amount;