diff options
author | Guy Harris <guy@alum.mit.edu> | 2018-03-25 15:09:56 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2018-03-25 23:49:35 +0000 |
commit | 494508f2d02d8380c4060354fa06de6a3de417f4 (patch) | |
tree | 232c6a465fdb808e27430192e3b653dca8de5bae /epan/dissectors/packet-lustre.c | |
parent | 6a75c59a22b1ec6b0d34dbe90b85a5ca275bc680 (diff) |
Clean up REPORT_DISSECTOR_BUG().
Have it take a format and argument list as arguments, and have the
formatting done inside the reporting code. That way, we're not relying
on any particular wmem scope working.
If WIRESHARK_ABORT_ON_DISSECTOR_BUG is set, try to add the message to
the crash information (currently only supported in macOS), and print it
to the standard error, before crashing. We won't necessarily have a
usable crash dump to analyze, so we can't rely on that to find the cause
of the crash.
Ping-Bug: 14490
Change-Id: I2b39169c45c84f2ada31efa1d413bd28c140f8f4
Reviewed-on: https://code.wireshark.org/review/26643
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'epan/dissectors/packet-lustre.c')
-rw-r--r-- | epan/dissectors/packet-lustre.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/epan/dissectors/packet-lustre.c b/epan/dissectors/packet-lustre.c index 60ae5e89e3..ecc8d9fac8 100644 --- a/epan/dissectors/packet-lustre.c +++ b/epan/dissectors/packet-lustre.c @@ -1581,11 +1581,10 @@ lustre_get_trans(packet_info *pinfo, struct lnet_trans_info *info) if (ptr != NULL) { /* XXX - Is this even possible? ?*/ trans = (lustre_trans_t *)ptr; - REPORT_DISSECTOR_BUG(wmem_strdup_printf(wmem_packet_scope(), - "ERROR: packet-lustre: conversation replaced: " - "trans:{opcode:%u sub_opcode:%" G_GINT64_MODIFIER "u match_bits:%" G_GINT64_MODIFIER "x} " - "with match_bits:%" G_GINT64_MODIFIER "x", - trans->opcode, trans->sub_opcode, trans->match_bits, info->match_bits)); + REPORT_DISSECTOR_BUG("ERROR: packet-lustre: conversation replaced: " + "trans:{opcode:%u sub_opcode:%" G_GINT64_MODIFIER "u match_bits:%" G_GINT64_MODIFIER "x} " + "with match_bits:%" G_GINT64_MODIFIER "x", + trans->opcode, trans->sub_opcode, trans->match_bits, info->match_bits); } } |