public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/27094] New: tree check: expected tree_list, have omp_return in build_call
@ 2006-04-09 21:00 debian-gcc at lists dot debian dot org
2006-04-09 21:01 ` [Bug c++/27094] " debian-gcc at lists dot debian dot org
` (14 more replies)
0 siblings, 15 replies; 16+ messages in thread
From: debian-gcc at lists dot debian dot org @ 2006-04-09 21:00 UTC (permalink / raw)
To: gcc-bugs
[ forwarded from http://bugs.debian.org/361407 ]
falk@juist:/tmp% g++ -c maria.tab.ii
maria.y: In constructor 'std::stack<_Tp, _Sequence>::stack(const _Sequence&)
[with _Tp = std::pair<const Type*, unsigned int>, _Sequence =
std::list<std::pair<const Type*, unsigned int>, std::allocator<std::pair<const
Type*, unsigned int> > >]':
maria.y:157: internal compiler error: tree check: expected tree_list, have
omp_return in build_call, at cp/call.c:329
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
Attempts to reduce this fail. Looks like memory corruption. No problem
with 4.1.
Falk
--
Summary: tree check: expected tree_list, have omp_return in
build_call
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: debian-gcc at lists dot debian dot org
GCC build triplet: x86_64-linux-gnu
GCC host triplet: x86_64-linux-gnu
GCC target triplet: x86_64-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27094
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/27094] tree check: expected tree_list, have omp_return in build_call
2006-04-09 21:00 [Bug c++/27094] New: tree check: expected tree_list, have omp_return in build_call debian-gcc at lists dot debian dot org
@ 2006-04-09 21:01 ` debian-gcc at lists dot debian dot org
2006-04-09 21:37 ` [Bug c++/27094] [4.2 Regression] " pinskia at gcc dot gnu dot org
` (13 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: debian-gcc at lists dot debian dot org @ 2006-04-09 21:01 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from debian-gcc at lists dot debian dot org 2006-04-09 21:01 -------
Created an attachment (id=11229)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=11229&action=view)
test case
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27094
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/27094] [4.2 Regression] tree check: expected tree_list, have omp_return in build_call
2006-04-09 21:00 [Bug c++/27094] New: tree check: expected tree_list, have omp_return in build_call debian-gcc at lists dot debian dot org
2006-04-09 21:01 ` [Bug c++/27094] " debian-gcc at lists dot debian dot org
@ 2006-04-09 21:37 ` pinskia at gcc dot gnu dot org
2006-04-09 21:38 ` pinskia at gcc dot gnu dot org
` (12 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-04-09 21:37 UTC (permalink / raw)
To: gcc-bugs
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|tree check: expected |[4.2 Regression] tree check:
|tree_list, have omp_return |expected tree_list, have
|in build_call |omp_return in build_call
Target Milestone|--- |4.2.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27094
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/27094] [4.2 Regression] tree check: expected tree_list, have omp_return in build_call
2006-04-09 21:00 [Bug c++/27094] New: tree check: expected tree_list, have omp_return in build_call debian-gcc at lists dot debian dot org
2006-04-09 21:01 ` [Bug c++/27094] " debian-gcc at lists dot debian dot org
2006-04-09 21:37 ` [Bug c++/27094] [4.2 Regression] " pinskia at gcc dot gnu dot org
@ 2006-04-09 21:38 ` pinskia at gcc dot gnu dot org
2006-04-09 21:40 ` pinskia at gcc dot gnu dot org
` (11 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-04-09 21:38 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from pinskia at gcc dot gnu dot org 2006-04-09 21:38 -------
I could not reproduce this with the default gc params for checking but could
with:
--param ggc-min-expand=0 --param ggc-min-heapsize=0
Which means this is a GC issue.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords|openmp |GC, ice-on-valid-code
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27094
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/27094] [4.2 Regression] tree check: expected tree_list, have omp_return in build_call
2006-04-09 21:00 [Bug c++/27094] New: tree check: expected tree_list, have omp_return in build_call debian-gcc at lists dot debian dot org
` (2 preceding siblings ...)
2006-04-09 21:38 ` pinskia at gcc dot gnu dot org
@ 2006-04-09 21:40 ` pinskia at gcc dot gnu dot org
2006-04-10 11:34 ` [Bug c++/27094] [4.0/4.1/4.2 " reichelt at gcc dot gnu dot org
` (10 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-04-09 21:40 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from pinskia at gcc dot gnu dot org 2006-04-09 21:40 -------
Reducing.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27094
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/27094] [4.0/4.1/4.2 Regression] tree check: expected tree_list, have omp_return in build_call
2006-04-09 21:00 [Bug c++/27094] New: tree check: expected tree_list, have omp_return in build_call debian-gcc at lists dot debian dot org
` (3 preceding siblings ...)
2006-04-09 21:40 ` pinskia at gcc dot gnu dot org
@ 2006-04-10 11:34 ` reichelt at gcc dot gnu dot org
2006-04-10 16:22 ` pinskia at gcc dot gnu dot org
` (9 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2006-04-10 11:34 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from reichelt at gcc dot gnu dot org 2006-04-10 11:34 -------
Confirmed. Reduced testcase
(compile with "g++ --param ggc-min-expand=0 --param ggc-min-heapsize=0"):
=============================
struct A
{
~A();
};
struct B : A
{
B();
};
template<int> struct C
{
C(const B& = B());
};
C<0> c;
=============================
The regression appeared in GCC 4.0.2.
On mainline the error message reads:
PR27094.cc: In constructor 'C<<anonymous> >::C(const B&) [with int <anonymous>
= 0]':
PR27094.cc:16: internal compiler error: tree check: expected tree_list, have
omp_return in build_call, at cp/call.c:329
Please submit a full bug report, [etc.]
On the 4.0 and 4.1 branch we have:
PR27094.cc: In constructor 'C<<anonymous> >::C(const B&) [with int <anonymous>
= 0]':
PR27094.cc:16: internal compiler error: tree check: expected tree_list, have
dl_expr in build_call, at cp/call.c:330
Please submit a full bug report, [etc.]
--
reichelt at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |reichelt at gcc dot gnu dot
| |org
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Keywords| |monitored
Known to fail| |4.0.2 4.1.0 4.1.1 4.2.0
Known to work| |3.4.6 4.0.0 4.0.1
Last reconfirmed|0000-00-00 00:00:00 |2006-04-10 11:34:47
date| |
Summary|[4.2 Regression] tree check:|[4.0/4.1/4.2 Regression]
|expected tree_list, have |tree check: expected
|omp_return in build_call |tree_list, have omp_return
| |in build_call
Target Milestone|4.2.0 |4.1.1
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27094
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/27094] [4.0/4.1/4.2 Regression] tree check: expected tree_list, have omp_return in build_call
2006-04-09 21:00 [Bug c++/27094] New: tree check: expected tree_list, have omp_return in build_call debian-gcc at lists dot debian dot org
` (4 preceding siblings ...)
2006-04-10 11:34 ` [Bug c++/27094] [4.0/4.1/4.2 " reichelt at gcc dot gnu dot org
@ 2006-04-10 16:22 ` pinskia at gcc dot gnu dot org
2006-04-12 11:46 ` jakub at gcc dot gnu dot org
` (8 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-04-10 16:22 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from pinskia at gcc dot gnu dot org 2006-04-10 16:22 -------
Here is another testcase (which was reduced from the same source and gives a
similar error message but does not have inheritance in it):
template<typename _Tp> struct allocator
{
~allocator() throw() { }
};
struct list
{
allocator<int> _M_impl;
};
template <int>
struct stack {
stack(const list& __c = list());
};
stack <1> a;
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
GCC build triplet|x86_64-linux-gnu |
GCC host triplet|x86_64-linux-gnu |
GCC target triplet|x86_64-linux-gnu |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27094
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/27094] [4.0/4.1/4.2 Regression] tree check: expected tree_list, have omp_return in build_call
2006-04-09 21:00 [Bug c++/27094] New: tree check: expected tree_list, have omp_return in build_call debian-gcc at lists dot debian dot org
` (5 preceding siblings ...)
2006-04-10 16:22 ` pinskia at gcc dot gnu dot org
@ 2006-04-12 11:46 ` jakub at gcc dot gnu dot org
2006-04-16 19:21 ` mmitchel at gcc dot gnu dot org
` (7 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: jakub at gcc dot gnu dot org @ 2006-04-12 11:46 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from jakub at gcc dot gnu dot org 2006-04-12 11:46 -------
It is a GC problem, when build_over_call calls mark_used, it certainly doesn't
expect mark_used to do a gcc_collect underneath it, as it has several tree
pointers stored in local variables. I guess build_over_call isn't the only
place that trusts mark_used doesn't do that, e.g. build_call,
build_op_delete_call, finish_eh_spec_block etc. likely suffer from the same
problem.
The call chain that leads to ggc_collect is mark_used ->
{synthetize_method,instantiate_decl} -> expand_or_defer_fn ->
cgraph_finalize_function -> ggc_collect.
So, either we change mark_used to never trigger GC from underneath us
(e.g. by function_depth++; synthetise_method (...); function_depth--; and
probably similarly for instantiate_decl), or we add an argument to mark_used
if it is ok to ggc_collect (similarly to cgraph_finalize_function's NESTED
argument), or we change all mark_used callers that might suffer from this
(either by adding function_depth++/function_depth-- around the call, or by
registering its temporaries with GC before calling mark_used).
--
jakub at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jason at redhat dot com,
| |mark at codesourcery dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27094
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/27094] [4.0/4.1/4.2 Regression] tree check: expected tree_list, have omp_return in build_call
2006-04-09 21:00 [Bug c++/27094] New: tree check: expected tree_list, have omp_return in build_call debian-gcc at lists dot debian dot org
` (6 preceding siblings ...)
2006-04-12 11:46 ` jakub at gcc dot gnu dot org
@ 2006-04-16 19:21 ` mmitchel at gcc dot gnu dot org
2006-04-30 17:58 ` mmitchel at gcc dot gnu dot org
` (6 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-04-16 19:21 UTC (permalink / raw)
To: gcc-bugs
--
mmitchel at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P1
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27094
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/27094] [4.0/4.1/4.2 Regression] tree check: expected tree_list, have omp_return in build_call
2006-04-09 21:00 [Bug c++/27094] New: tree check: expected tree_list, have omp_return in build_call debian-gcc at lists dot debian dot org
` (7 preceding siblings ...)
2006-04-16 19:21 ` mmitchel at gcc dot gnu dot org
@ 2006-04-30 17:58 ` mmitchel at gcc dot gnu dot org
2006-04-30 23:21 ` mmitchel at gcc dot gnu dot org
` (5 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-04-30 17:58 UTC (permalink / raw)
To: gcc-bugs
--
mmitchel at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |mark at codesourcery dot com
|dot org |
Status|NEW |ASSIGNED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27094
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/27094] [4.0/4.1/4.2 Regression] tree check: expected tree_list, have omp_return in build_call
2006-04-09 21:00 [Bug c++/27094] New: tree check: expected tree_list, have omp_return in build_call debian-gcc at lists dot debian dot org
` (8 preceding siblings ...)
2006-04-30 17:58 ` mmitchel at gcc dot gnu dot org
@ 2006-04-30 23:21 ` mmitchel at gcc dot gnu dot org
2006-04-30 23:25 ` mmitchel at gcc dot gnu dot org
` (4 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-04-30 23:21 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from mmitchel at gcc dot gnu dot org 2006-04-30 23:21 -------
Subject: Bug 27094
Author: mmitchel
Date: Sun Apr 30 23:21:38 2006
New Revision: 113399
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=113399
Log:
PR c++/27094
* pt.c (tsubst_default_argument): Increment function_depth around
call to tsubst_expr.
* parser.c (cp_parser_parameter_declaration): Likewise.
* decl2.c (mark_used): Tidy.
PR c++/27094
* g++.dg/template/defarg8.C: New test.
Added:
trunk/gcc/testsuite/g++.dg/template/defarg8.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/decl2.c
trunk/gcc/cp/parser.c
trunk/gcc/cp/pt.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27094
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/27094] [4.0/4.1/4.2 Regression] tree check: expected tree_list, have omp_return in build_call
2006-04-09 21:00 [Bug c++/27094] New: tree check: expected tree_list, have omp_return in build_call debian-gcc at lists dot debian dot org
` (9 preceding siblings ...)
2006-04-30 23:21 ` mmitchel at gcc dot gnu dot org
@ 2006-04-30 23:25 ` mmitchel at gcc dot gnu dot org
2006-04-30 23:29 ` [Bug c++/27094] [4.0 " mmitchel at gcc dot gnu dot org
` (3 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-04-30 23:25 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from mmitchel at gcc dot gnu dot org 2006-04-30 23:25 -------
Subject: Bug 27094
Author: mmitchel
Date: Sun Apr 30 23:25:44 2006
New Revision: 113400
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=113400
Log:
PR c++/27094
* pt.c (tsubst_default_argument): Increment function_depth around
call to tsubst_expr.
* parser.c (cp_parser_parameter_declaration): Likewise.
PR c++/27094
* g++.dg/template/defarg8.C: New test.
Added:
branches/gcc-4_1-branch/gcc/testsuite/g++.dg/template/defarg8.C
Modified:
branches/gcc-4_1-branch/gcc/cp/ChangeLog
branches/gcc-4_1-branch/gcc/cp/parser.c
branches/gcc-4_1-branch/gcc/cp/pt.c
branches/gcc-4_1-branch/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27094
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/27094] [4.0 Regression] tree check: expected tree_list, have omp_return in build_call
2006-04-09 21:00 [Bug c++/27094] New: tree check: expected tree_list, have omp_return in build_call debian-gcc at lists dot debian dot org
` (10 preceding siblings ...)
2006-04-30 23:25 ` mmitchel at gcc dot gnu dot org
@ 2006-04-30 23:29 ` mmitchel at gcc dot gnu dot org
2006-04-30 23:30 ` pinskia at gcc dot gnu dot org
` (2 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-04-30 23:29 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from mmitchel at gcc dot gnu dot org 2006-04-30 23:29 -------
Fixed in 4.1.1.
--
mmitchel at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[4.0/4.1/4.2 Regression] |[4.0 Regression] tree check:
|tree check: expected |expected tree_list, have
|tree_list, have omp_return |omp_return in build_call
|in build_call |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27094
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/27094] [4.0 Regression] tree check: expected tree_list, have omp_return in build_call
2006-04-09 21:00 [Bug c++/27094] New: tree check: expected tree_list, have omp_return in build_call debian-gcc at lists dot debian dot org
` (11 preceding siblings ...)
2006-04-30 23:29 ` [Bug c++/27094] [4.0 " mmitchel at gcc dot gnu dot org
@ 2006-04-30 23:30 ` pinskia at gcc dot gnu dot org
2006-05-01 2:30 ` mmitchel at gcc dot gnu dot org
2007-02-03 16:50 ` gdr at gcc dot gnu dot org
14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-04-30 23:30 UTC (permalink / raw)
To: gcc-bugs
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.1.1 |4.0.4
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27094
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/27094] [4.0 Regression] tree check: expected tree_list, have omp_return in build_call
2006-04-09 21:00 [Bug c++/27094] New: tree check: expected tree_list, have omp_return in build_call debian-gcc at lists dot debian dot org
` (12 preceding siblings ...)
2006-04-30 23:30 ` pinskia at gcc dot gnu dot org
@ 2006-05-01 2:30 ` mmitchel at gcc dot gnu dot org
2007-02-03 16:50 ` gdr at gcc dot gnu dot org
14 siblings, 0 replies; 16+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-05-01 2:30 UTC (permalink / raw)
To: gcc-bugs
--
mmitchel at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|mark at codesourcery dot com|unassigned at gcc dot gnu
| |dot org
Status|ASSIGNED |NEW
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27094
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/27094] [4.0 Regression] tree check: expected tree_list, have omp_return in build_call
2006-04-09 21:00 [Bug c++/27094] New: tree check: expected tree_list, have omp_return in build_call debian-gcc at lists dot debian dot org
` (13 preceding siblings ...)
2006-05-01 2:30 ` mmitchel at gcc dot gnu dot org
@ 2007-02-03 16:50 ` gdr at gcc dot gnu dot org
14 siblings, 0 replies; 16+ messages in thread
From: gdr at gcc dot gnu dot org @ 2007-02-03 16:50 UTC (permalink / raw)
To: gcc-bugs
------- Comment #10 from gdr at gcc dot gnu dot org 2007-02-03 16:49 -------
Fixed in GCC-4.1.1.
--
gdr at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
Target Milestone|4.0.4 |4.1.1
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27094
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2007-02-03 16:50 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-04-09 21:00 [Bug c++/27094] New: tree check: expected tree_list, have omp_return in build_call debian-gcc at lists dot debian dot org
2006-04-09 21:01 ` [Bug c++/27094] " debian-gcc at lists dot debian dot org
2006-04-09 21:37 ` [Bug c++/27094] [4.2 Regression] " pinskia at gcc dot gnu dot org
2006-04-09 21:38 ` pinskia at gcc dot gnu dot org
2006-04-09 21:40 ` pinskia at gcc dot gnu dot org
2006-04-10 11:34 ` [Bug c++/27094] [4.0/4.1/4.2 " reichelt at gcc dot gnu dot org
2006-04-10 16:22 ` pinskia at gcc dot gnu dot org
2006-04-12 11:46 ` jakub at gcc dot gnu dot org
2006-04-16 19:21 ` mmitchel at gcc dot gnu dot org
2006-04-30 17:58 ` mmitchel at gcc dot gnu dot org
2006-04-30 23:21 ` mmitchel at gcc dot gnu dot org
2006-04-30 23:25 ` mmitchel at gcc dot gnu dot org
2006-04-30 23:29 ` [Bug c++/27094] [4.0 " mmitchel at gcc dot gnu dot org
2006-04-30 23:30 ` pinskia at gcc dot gnu dot org
2006-05-01 2:30 ` mmitchel at gcc dot gnu dot org
2007-02-03 16:50 ` gdr at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).