Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash/Illegal instruction with Clang on OS X #621

Closed
rainman110 opened this issue May 24, 2016 · 2 comments
Closed

Crash/Illegal instruction with Clang on OS X #621

rainman110 opened this issue May 24, 2016 · 2 comments

Comments

@rainman110
Copy link

In release mode, Clang creates illegal code in AdvApp2Var_ApproxF2var::mma2fnc_

This is a meta issue containing the information from

To reproduce:

   std::ifstream file("fillet_crash.brep");
   TopoDS_Shape shape;
    BRep_Builder b;
    BRepTools::Read(shape, file, b);
    for (TopExp_Explorer exp(shape, TopAbs_EDGE); exp.More(); exp.Next())
    {
        try
        {
            BRepFilletAPI_MakeFillet filletMaker(shape);
            filletMaker.Add(0.165405, TopoDS::Edge(exp.Current()));
            filletMaker.Build();
        }
        catch (...)
        {
        }
    }

The file fillet_crash.brep was downloaded from the occt mantis: fillet_crash.zip

Possible fixes:

  • Compile src/AdvApp2Var/AdvApp2Var_ApproxF2var.cxx only with optimization level -O1
  • or add __attribute__ ((noinline)) to the static functions of AdvApp2Var_ApproxF2var as suggested by Roman Lygin
  • use the newest Clang (not tested yet) or a Clang older than 3.4
rainman110 added a commit to rainman110/oce that referenced this issue May 30, 2016
I implemented Roman Lygin's workaround described in
OCCT Mantis 0026778.

Fixes issue tpaviot#621
@ghost
Copy link

ghost commented Jun 12, 2016

Repeat of #520, but we'll leave it open for the time being anyway. #520 was put over to OCCT due to the size of the issue.

@ghost
Copy link

ghost commented Jul 26, 2016

This is fixed in OCCT master, closing.

@ghost ghost closed this as completed Jul 26, 2016
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant