Hi Marco,

        It's a bug in an optimizer pass, which is fixed here:
https://github.com/x10-lang/x10/commit/fe923f8f7196934f0080d2131d4d7d6eef37cf66

        However, the program probably won't do what you are expecting in
NativeX10 because the native x10rt_sockets layer doesn't support
notification callbacks on place addition or removal.  So the place
added/removed handlers you are trying to add in main are going to be
silently dropped on the floor with NativeX10.   I will likely replace the
NativeX10 empty implementation of the registration handlers with a body
that will print a warning message that the callback is being dropped
because it is not implemented for NativeX10 later today.

--dave



From:   Marco Bungart <m.bung...@gmx.net>
To:     Mailing list for users of the X10 programming language
            <x10-users@lists.sourceforge.net>
Date:   07/12/2016 09:10 AM
Subject:        [X10-users] Compiler Error when compiling with "-O" flag



Hi all,

I have a problem with an example program I have written. The program
compiles fine when compiled without "-O" flag:

     $> x10c++ ResilientHelloWorld.x10 -o ResilientHelloWorld
     $>

But when compiled with "-O", I get a NullPointerException:

     $> x10c++ ResilientHelloWorld.x10 -O -o ResilientHelloWorld
     Exception in thread "main" java.lang.NullPointerException
         at x10.visit.CodeCleanUp.leaveCall(CodeCleanUp.java:125)
         at
polyglot.visit.ErrorHandlingVisitor.leave(ErrorHandlingVisitor.java:292)
         at polyglot.visit.ContextVisitor.leave(ContextVisitor.java:151)
         at
polyglot.visit.NodeVisitor.visitEdgeNoOverride(NodeVisitor.java:265)
         at polyglot.visit.NodeVisitor.visitEdge(NodeVisitor.java:224)
         at polyglot.ast.Node_c.visitChild(Node_c.java:186)
         at polyglot.ast.Eval_c.visitChildren(Eval_c.java:64)
         at polyglot.ast.JL_c.visitChildren(JL_c.java:52)
         at x10.extension.X10Del_c.visitChildren(X10Del_c.java:143)
         at
polyglot.visit.NodeVisitor.visitEdgeNoOverride(NodeVisitor.java:258)
         at polyglot.visit.NodeVisitor.visitEdge(NodeVisitor.java:224)
         at polyglot.ast.Node_c.visitChild(Node_c.java:186)
         at polyglot.ast.Node_c.visitList(Node_c.java:246)
         at
polyglot.ast.AbstractBlock_c.visitChildren(AbstractBlock_c.java:78)
         at polyglot.ast.JL_c.visitChildren(JL_c.java:52)
         at x10.extension.X10Del_c.visitChildren(X10Del_c.java:143)
         at
polyglot.visit.NodeVisitor.visitEdgeNoOverride(NodeVisitor.java:258)
         at polyglot.visit.NodeVisitor.visitEdge(NodeVisitor.java:224)
         at polyglot.ast.Node_c.visitChild(Node_c.java:186)
         at polyglot.ast.MethodDecl_c.visitChildren(MethodDecl_c.java:166)
         at polyglot.ast.JL_c.visitChildren(JL_c.java:52)
         at x10.extension.X10Del_c.visitChildren(X10Del_c.java:143)
         at
polyglot.visit.NodeVisitor.visitEdgeNoOverride(NodeVisitor.java:258)
         at polyglot.visit.NodeVisitor.visitEdge(NodeVisitor.java:224)
         at polyglot.ast.Node_c.visitChild(Node_c.java:186)
         at polyglot.ast.Node_c.visitList(Node_c.java:246)
         at x10.ast.X10ClassBody_c.visitChildren(X10ClassBody_c.java:340)
         at polyglot.ast.JL_c.visitChildren(JL_c.java:52)
         at x10.extension.X10Del_c.visitChildren(X10Del_c.java:143)
         at
polyglot.visit.NodeVisitor.visitEdgeNoOverride(NodeVisitor.java:258)
         at polyglot.visit.NodeVisitor.visitEdge(NodeVisitor.java:224)
         at polyglot.ast.Node_c.visitChild(Node_c.java:186)
         at x10.ast.X10ClassDecl_c.visitChildren(X10ClassDecl_c.java:1651)
         at polyglot.ast.JL_c.visitChildren(JL_c.java:52)
         at x10.extension.X10Del_c.visitChildren(X10Del_c.java:143)
         at
polyglot.visit.NodeVisitor.visitEdgeNoOverride(NodeVisitor.java:258)
         at polyglot.visit.NodeVisitor.visitEdge(NodeVisitor.java:224)
         at polyglot.ast.Node_c.visitChild(Node_c.java:186)
         at polyglot.ast.Node_c.visitList(Node_c.java:246)
         at polyglot.ast.SourceFile_c.visitChildren(SourceFile_c.java:124)
         at polyglot.ast.JL_c.visitChildren(JL_c.java:52)
         at x10.extension.X10Del_c.visitChildren(X10Del_c.java:143)
         at
polyglot.visit.NodeVisitor.visitEdgeNoOverride(NodeVisitor.java:258)
         at polyglot.visit.NodeVisitor.visitEdge(NodeVisitor.java:224)
         at polyglot.ast.Node_c.visit(Node_c.java:190)
         at polyglot.frontend.VisitorGoal.runTask(VisitorGoal.java:62)
         at
x10.ExtensionInfo$X10Scheduler$ValidatingVisitorGoal.runTask
(ExtensionInfo.java:1106)
         at polyglot.frontend.Scheduler.runPass(Scheduler.java:372)
         at x10.ExtensionInfo$X10Scheduler.runPass(ExtensionInfo.java:1250)
         at polyglot.frontend.AbstractGoal_c.run(AbstractGoal_c.java:147)
         at polyglot.types.LazyRef_c.get(LazyRef_c.java:70)
         at polyglot.frontend.AbstractGoal_c.run(AbstractGoal_c.java:89)
         at polyglot.types.LazyRef_c.get(LazyRef_c.java:70)
         at polyglot.frontend.AbstractGoal_c.run(AbstractGoal_c.java:89)
         at polyglot.types.LazyRef_c.get(LazyRef_c.java:70)
         at polyglot.frontend.AbstractGoal_c.run(AbstractGoal_c.java:89)
         at polyglot.types.LazyRef_c.get(LazyRef_c.java:70)
         at polyglot.frontend.AbstractGoal_c.run(AbstractGoal_c.java:89)
         at polyglot.types.LazyRef_c.get(LazyRef_c.java:70)
         at polyglot.frontend.AbstractGoal_c.run(AbstractGoal_c.java:89)
         at polyglot.types.LazyRef_c.get(LazyRef_c.java:70)
         at polyglot.frontend.AbstractGoal_c.run(AbstractGoal_c.java:89)
         at polyglot.types.LazyRef_c.get(LazyRef_c.java:70)
         at polyglot.frontend.AbstractGoal_c.run(AbstractGoal_c.java:89)
         at polyglot.types.LazyRef_c.get(LazyRef_c.java:70)
         at polyglot.frontend.AbstractGoal_c.run(AbstractGoal_c.java:89)
         at polyglot.types.LazyRef_c.get(LazyRef_c.java:70)
         at polyglot.frontend.AbstractGoal_c.run(AbstractGoal_c.java:89)
         at polyglot.types.LazyRef_c.get(LazyRef_c.java:70)
         at polyglot.frontend.AbstractGoal_c.run(AbstractGoal_c.java:89)
         at polyglot.types.LazyRef_c.get(LazyRef_c.java:70)
         at polyglot.frontend.AbstractGoal_c.run(AbstractGoal_c.java:89)
         at polyglot.types.LazyRef_c.get(LazyRef_c.java:70)
         at polyglot.frontend.AbstractGoal_c.run(AbstractGoal_c.java:89)
         at polyglot.types.LazyRef_c.get(LazyRef_c.java:70)
         at polyglot.frontend.Scheduler.attempt(Scheduler.java:272)
         at polyglot.frontend.Scheduler.runToCompletion(Scheduler.java:206)
         at polyglot.frontend.Scheduler.runToCompletion(Scheduler.java:192)
         at polyglot.frontend.Compiler.compile(Compiler.java:284)
         at polyglot.frontend.Compiler.compileFiles(Compiler.java:244)
         at polyglot.main.Main.start(Main.java:141)
         at polyglot.main.Main.start(Main.java:82)
         at polyglot.main.Main.main(Main.java:191)

My sample program is attached. Could someone point out, what is going
wrong here?

Cheers,
Marco
[attachment "ResilientHelloWorld.x10" deleted by David P Grove/Watson/IBM]
------------------------------------------------------------------------------

What NetFlow Analyzer can do for you? Monitors network bandwidth and
traffic
patterns at an interface-level. Reveals which users, apps, and protocols
are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning
reports.http://sdm.link/zohodev2dev_______________________________________________

X10-users mailing list
X10-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/x10-users


------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
_______________________________________________
X10-users mailing list
X10-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/x10-users

Reply via email to