Zoltan Somogyi
953ea7667f
Fix deconstructing direct args.
...
The crash that this diff fixes occurred when giving a command such as
"print Var^1" to mdb, where the first argument of Var is a direct arg.
runtime/mercury_ml_expand_body.h:
When deconstructing a term with a direct arg, return NULL
as the value of expand_info->chosen_arg_word_sized_ptr.
The crash occurred when we returned a non-null pointer,
which violated the expectations of trace/mercury_trace_vars.c
and its callers. (Not surprising, since those that function and
its callers were written long before the direct_arg optimization
was added to the system.)
runtime/mercury_deconstruct.h:
Document the rationale behind the above changes. (The contents of
mercury_ml_expand_body.h are #included in mercury_deconstruct.c.)
trace/mercury_trace_vars.c:
Add the debugging code I used to track down this issue, in disabled form.
Fix missing copyright year.
trace/mercury_trace_browse.c:
Delete obsolete comment.
Fix missing copyright years.
tests/debugger/direct_arg_test.{m,inp,exp}:
A test case for this bug.
tests/debugger/Mmakefile:
Enable the new test case.
compiler/hlds_out_type_table.m:
When dumping out the data constructors in the type table,
if a constructor has names for some of its fields,
put the name and the type of each field on different lines.
In the original test case for this bug, of which direct_arg_test.m
is an extreme simplification, pretty much every line overflows
without this.
Also, factor out some duplicated code, and replace bools with values
of a bespoke type.
2026-03-13 14:50:15 +11:00
..
2023-01-23 02:29:13 +11:00
2023-06-26 20:05:24 +10:00
2018-08-02 14:45:42 +10:00
2018-06-09 17:43:12 +10:00
2018-06-09 17:43:12 +10:00
2018-06-09 17:43:12 +10:00
2018-06-09 17:43:12 +10:00
2018-06-09 17:43:12 +10:00
2018-06-09 17:43:12 +10:00
2024-09-02 10:27:50 +10:00
2018-06-09 17:43:12 +10:00
2018-06-09 17:43:12 +10:00
2021-06-06 19:07:20 +10:00
2018-06-09 17:43:12 +10:00
2020-07-24 17:14:07 +10:00
2018-06-09 17:43:12 +10:00
2018-06-09 17:43:12 +10:00
2018-06-09 17:43:12 +10:00
2018-06-09 17:43:12 +10:00
2025-05-20 08:30:52 +10:00
2026-02-01 02:53:04 +11:00
2021-04-09 17:41:23 +10:00
2021-04-09 17:36:38 +10:00
2024-01-26 15:52:35 +11:00
2020-10-25 14:45:35 +11:00
2022-12-29 20:33:08 +11:00
2022-12-29 20:33:08 +11:00
2021-04-09 17:41:23 +10:00
2021-04-09 17:41:23 +10:00
2026-03-13 14:50:15 +11:00
2018-06-09 17:43:12 +10:00
2021-04-09 17:41:23 +10:00
2021-04-09 17:41:23 +10:00
2018-06-09 17:43:12 +10:00
2018-06-09 17:43:12 +10:00
2018-06-09 17:43:12 +10:00
2025-05-16 20:06:52 +10:00
2018-06-09 17:43:12 +10:00
2018-06-09 17:43:12 +10:00
2026-01-29 00:11:37 +11:00
2018-06-09 17:43:12 +10:00
2018-06-09 17:43:12 +10:00
2018-06-09 17:43:12 +10:00
2023-09-09 14:23:50 +10:00
2018-06-09 17:43:12 +10:00
2018-06-09 17:43:12 +10:00
2018-06-09 17:43:12 +10:00
2023-11-06 16:15:34 +11:00
2024-10-14 00:04:09 +11:00
2025-04-30 13:08:12 +10:00
2022-08-23 16:39:48 +10:00
2018-06-09 17:43:12 +10:00
2018-06-09 17:43:12 +10:00
2018-06-09 17:43:12 +10:00
2019-10-08 21:36:11 +11:00
2018-06-09 17:43:12 +10:00
2018-06-09 17:43:12 +10:00
2019-06-10 13:30:49 +10:00
2019-06-10 13:30:49 +10:00
2019-06-10 13:30:49 +10:00
2026-02-01 02:53:04 +11:00
2018-06-09 17:43:12 +10:00
2025-08-09 21:48:23 +02:00
2018-06-09 17:43:12 +10:00
2018-06-09 17:43:12 +10:00
2018-06-09 17:43:12 +10:00
2018-06-09 17:43:12 +10:00
2018-06-09 17:43:12 +10:00
2018-06-09 17:43:12 +10:00
2018-08-10 14:47:20 +10:00
2018-06-09 17:43:12 +10:00
2019-06-08 16:40:24 +10:00
2018-06-09 17:43:12 +10:00
2018-06-09 17:43:12 +10:00
2020-04-11 19:30:58 +10:00
2022-07-05 08:00:12 +10:00
2018-06-09 17:43:12 +10:00
2018-06-09 17:43:12 +10:00
2018-06-09 17:43:12 +10:00
2018-06-09 17:43:12 +10:00
2018-06-09 17:43:12 +10:00
2022-12-29 20:33:08 +11:00
2020-04-28 10:55:18 +10:00
2022-07-05 08:00:12 +10:00
2018-06-09 17:43:12 +10:00
2025-05-03 17:30:04 +10:00
2018-06-09 17:43:12 +10:00
2026-01-26 17:58:53 +11:00
2018-06-09 17:43:12 +10:00
2024-08-29 11:46:44 +10:00
2022-12-29 20:33:08 +11:00
2025-05-20 08:30:52 +10:00
2025-05-05 19:04:56 +10:00
2025-08-25 15:48:28 +02:00
2025-08-25 15:48:28 +02:00
2018-08-19 12:19:19 +10:00
2018-06-09 17:43:12 +10:00
2018-08-30 05:14:38 +10:00
2018-08-30 05:14:38 +10:00
2026-03-13 14:50:15 +11:00
2018-08-30 05:14:38 +10:00
2018-06-09 17:43:12 +10:00
2018-06-09 17:43:12 +10:00
2022-12-29 20:33:08 +11:00
2018-06-09 17:43:12 +10:00
2018-06-09 17:43:12 +10:00
2018-06-09 17:43:12 +10:00
2022-07-05 08:00:12 +10:00
2018-06-09 17:43:12 +10:00
2018-06-09 17:43:12 +10:00
2018-06-09 17:43:12 +10:00
2018-06-09 17:43:12 +10:00
2018-06-09 17:43:12 +10:00
2018-06-09 17:43:12 +10:00
2018-09-11 10:55:30 +10:00
2018-09-11 10:55:30 +10:00
2018-06-09 17:43:12 +10:00
2025-06-19 15:32:14 +02:00
2018-06-09 17:43:12 +10:00
2021-01-13 14:22:21 +11:00
2024-02-20 15:09:17 +11:00
2024-02-20 15:09:17 +11:00
2026-03-12 07:37:54 +11:00
2023-10-22 14:34:42 +11:00
2020-10-13 13:32:32 +11:00
2020-10-13 13:32:32 +11:00
2018-07-23 10:26:29 +10:00
2022-07-05 08:00:12 +10:00
2024-10-02 10:38:02 +02:00
2024-10-02 10:38:02 +02:00
2018-07-23 10:26:29 +10:00
2018-06-09 17:43:12 +10:00
2023-12-03 00:19:48 +11:00
2018-06-09 17:43:12 +10:00
2018-06-09 17:43:12 +10:00
2024-04-28 16:49:18 +10:00
2024-04-02 12:44:41 +11:00
2018-06-09 17:43:12 +10:00
2018-06-09 17:43:12 +10:00
2021-04-09 17:41:23 +10:00
2018-06-09 17:43:12 +10:00
2018-06-09 17:43:12 +10:00
2018-06-09 17:43:12 +10:00
2018-06-09 17:43:12 +10:00
2018-06-09 17:43:12 +10:00
2018-06-09 17:43:12 +10:00
2018-08-30 05:14:38 +10:00
2018-06-09 17:43:12 +10:00
2025-03-28 17:35:32 +11:00
2021-04-09 17:41:23 +10:00
2018-06-09 17:43:12 +10:00
2018-08-19 12:19:19 +10:00
2018-06-09 17:43:12 +10:00
2018-10-09 05:27:36 +00:00
2018-06-09 17:43:12 +10:00
2018-06-09 17:43:12 +10:00
2018-11-29 06:01:42 +00:00
2024-08-29 11:46:44 +10:00
2025-03-29 05:27:40 +11:00
2020-01-17 17:09:49 +11:00
2018-06-09 17:43:12 +10:00
2020-02-18 13:07:24 +11:00
2020-02-18 13:07:24 +11:00
2018-06-09 17:43:12 +10:00
2022-01-01 15:53:34 +11:00
2018-08-30 05:14:38 +10:00
2021-04-09 17:41:23 +10:00
2018-06-09 17:43:12 +10:00
2018-06-09 17:43:12 +10:00
2018-06-09 17:43:12 +10:00
2023-12-20 15:32:02 +11:00
2021-04-09 17:41:23 +10:00
2018-06-09 17:43:12 +10:00
2022-08-29 10:57:39 +10:00
2022-08-23 16:39:48 +10:00
2018-06-09 17:43:12 +10:00
2026-02-27 20:32:38 +11:00
2022-01-31 14:11:08 +11:00
2018-06-09 17:43:12 +10:00
2018-06-09 17:43:12 +10:00
2020-03-15 17:05:47 +11:00
2022-05-26 12:47:21 +10:00
2026-03-09 09:13:52 +11:00
2019-06-10 13:30:49 +10:00
2020-10-13 13:32:32 +11:00