Chris,
I ran into a similar problem last weekend with recursive calls like the one
you've presented. I did some digging around in the Chapel generated C code
and, for my case, the program produced correct results but was not cleaning
up generated data structures correctly before the program terminated. An
array was being created, was never initialized with a value, and was trying
to be destroyed during program clean up - which caused a crash with the
exact same output message.
Thank you very much for expressing this problem in a succinct and
reproducible manner!
--
ct
On Mon, Mar 28, 2016 at 5:51 PM, Christopher Swenson <[email protected]>
wrote:
> I ran into an internal error.
>
> Minimal reproducer is
>
> proc f() : (int, int) {
> return f();
> }
> proc main() {
> f();
> }
>
> output:
> repro.chpl:2: internal error: number of actuals does not match number of
> formals [callDestructors.cpp:1120]
>
> (Also at https://gist.github.com/swenson/34490cd907cc8330614e)
>
>
> I did some debugging, and the function where the asserting is reads:
>
> ...
> void insertReferenceTemps(CallExpr* call) {
> for_formals_actuals(formal, actual, call)
> ...
>
> It appears as though the tuple is created to contain the return value, and
> when the destructor is invoked, it has to pass the implicit self (_ref),
> which is what I think insertReferenceTemps is doing. However,
> for_formals_actuals only works if the implicit self has already been
> inserted?
>
> I have a workaround that patches for_formals_actuals, but I'd be afraid it
> introduces more bugs than it cures, so I'm trying to figure out why this is
> only occurring here, and not for every destructor call. Any pointers would
> be appreciated. :)
>
> --Christopher
>
>
>
> ------------------------------------------------------------------------------
> Transform Data into Opportunity.
> Accelerate data analysis in your applications with
> Intel Data Analytics Acceleration Library.
> Click to learn more.
> http://pubads.g.doubleclick.net/gampad/clk?id=278785471&iu=/4140
> _______________________________________________
> Chapel-bugs mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/chapel-bugs
>
>
------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
Chapel-bugs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/chapel-bugs