Uploaded image for project: 'Lucy'
  1. Lucy
  2. LUCY-216

t/152-inversion.t failure

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.3.1, 0.4.0
    • Component/s: None
    • Labels:
      None

      Description

      Devs,

      Today Marvin helped me track down what we believe is a compiler optimization bug associated with the latest version of xcode and Mac OS 10.7.3 (Lion), compiler clan version 3.1. To summarize, I was getting the following unit test failure when after compiling Lucy with Perl 5.14.2 (perl brew install):

      not ok 2 - catch overflow in token position calculation

      1. Failed test 'catch overflow in token position calculation'
      2. at t/152-inversion.t line 70.
      3. ''
      4. doesn't match '(?^:position)'

      After dropping in various debug statements the unit test would magically begin to pass. At this point I turned off optimization and the test would always pass. Based on this evidence it would be safe to surmise that the optimizer is making a mistake somewhere. After further discussions on IRC with Marvin, we speculated that 32 bit integers that are being accumulated into 64 bit registers are not being truncated back to 32 bit prior to a comparison operation. Apparently during these stages we're speculating that the optimizer is running afoul.

      One idea that was floated on IRC was to convert the associated integers in question to int64_t, since support for 64 bit integers is required anyways for Lucy. However, we wanted to throw this issue up to the list and see if anyone else can maybe a) replicate this and b) has any other thoughtful solutions.

      Cheers,
      Logan

        Attachments

        1. Inversion.s-O1
          16 kB
          Logan J. Bell
        2. Inversion.s-O0O1.diff
          4 kB
          Logan J. Bell
        3. Inversion.s-O0
          19 kB
          Logan J. Bell

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              logie Logan J. Bell
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: