Changeset 88f386c in git


Ignore:
Timestamp:
Jul 29, 2018, 10:07:08 PM (6 years ago)
Author:
Karim Abou Zeid <karim23697@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
85d7d333234b16c76e1eca63a87f3ab727763f92
Parents:
5676fd99d0794f1da7107c0a1d9df72f9dcdf5bd
Message:
Fix segfault with coeffs
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/GBEngine/kspoly.cc

    r5676fd r88f386c  
    136136    int ct = ksCheckCoeff(&an, &bn, tailRing->cf);    // Calculate special LC
    137137    p_SetCoeff(lm, bn, tailRing);
     138    if (tailRing->isLPring) pSetCoeff0(p1, bn); // lm doesn't point to p1 anymore, if the coef was a pointer, it has been deleted
    138139    if ((ct == 0) || (ct == 2))
    139140      PR->Tail_Mult_nn(an);
     
    256257    int ct = ksCheckCoeff(&an, &bn, tailRing->cf);    // Calculate special LC
    257258    p_SetCoeff(lm, bn, tailRing);
     259    if (tailRing->isLPring) pSetCoeff0(p1, bn); // lm doesn't point to p1 anymore, if the coef was a pointer, it has been deleted
    258260    if ((ct == 0) || (ct == 2))
    259261      PR->Tail_Mult_nn(an);
     
    457459    int ct = ksCheckCoeff(&an, &bn, tailRing->cf);    // Calculate special LC
    458460    p_SetCoeff(lm, bn, tailRing);
     461    if (tailRing->isLPring) pSetCoeff0(p1, bn); // lm doesn't point to p1 anymore, if the coef was a pointer, it has been deleted
    459462    if ((ct == 0) || (ct == 2))
    460463      PR->Tail_Mult_nn(an);
     
    688691  {
    689692    p_SetCoeff(lm, nDiv(pGetCoeff(lm),pGetCoeff(p2)), tailRing);
     693    if (tailRing->isLPring) pSetCoeff0(p1, pGetCoeff(lm)); // lm doesn't point to p1 anymore, if the coef was a pointer, it has been deleted
    690694    if (coef != NULL) *coef = n_Init(1, tailRing->cf);
    691695  }
     
    698702      int ct = ksCheckCoeff(&an, &bn, tailRing->cf);    // Calculate special LC
    699703      p_SetCoeff(lm, bn, tailRing);
     704      if (tailRing->isLPring) pSetCoeff0(p1, bn); // lm doesn't point to p1 anymore, if the coef was a pointer, it has been deleted
    700705      if (((ct == 0) || (ct == 2)))
    701706        PR->Tail_Mult_nn(an);
Note: See TracChangeset for help on using the changeset viewer.