Ticket #2029 (closed bug: fixed)

Opened 4 years ago

Last modified 4 years ago

new 'structview' PMC does not work on bigendian systems

Reported by: jkeenan Owned by: plobsing
Priority: normal Milestone:
Component: core Version: 3.1.0
Severity: medium Keywords:
Cc: gerd Language:
Patch status: applied Platform:

Description

This test file was recently added (Feb 20) to master. It is causing test failures on Darwin/PPC:

t/pmc/structview.t                        (Wstat: 256 Tests: 4 Failed: 0)
  Non-zero exit status: 1
  Parse errors: Bad plan.  You planned 16 tests but ran 4.

On this platform, I use gcc for cc and g++ for ld and link.

I should also note that when I do an all-g++ build on linux/i386, I get massive numbers of warnings in ./src/pmc/structview.pmc. See:  http://nopaste.snit.ch/34304. This PMC was also added for the first time on Feb 20. Perhaps it's not quite ready for prime time.

Assigning ticket to files' author.

Thank you very much.

kid51

Attachments

be.patch Download (1.6 KB) - added by plobsing 4 years ago.
Bigendian Patch

Change History

  Changed 4 years ago by jkeenan

ok 1 - 8 bits in one byte
ok 2 - single byte is byte-aligned
ok 3 - byte-aligned single byte is single byte when aligned
ok 4 - allocate an instance
Unaligned write not yet implemented for big-endian systems
current instr.: 'test_bit_struct' pc 203 (t/pmc/structview.t:45)
called from Sub 'main' pc 38 (t/pmc/structview.t:11)

  Changed 4 years ago by jkeenan

Darwin/PPC:

$ grep -n endian lib/Parrot/Config/Generated.pm 
74:  'bigendian' => 1,

Linux/i386:

$ grep -n endian lib/Parrot/Config/Generated.pm
76:  'bigendian' => 0,

If the structview PMC can't work on bigendian systems, then it probably should not be included in master.

Thank you very much.

kid51

  Changed 4 years ago by jkeenan

  • summary changed from t/pmc/structview.t: New PMC generates failures on Darwin/PPC to new 'structview' PMC does not work on bigendian systems

Changed 4 years ago by plobsing

Bigendian Patch

  Changed 4 years ago by plobsing

Please try be.patch. The BE/LE difference is a holdover from attempting to do signed, unaligned access, which was abandonned. BE/LE code for unsigned, unaligned access should be identical.

follow-up: ↓ 6   Changed 4 years ago by jkeenan

Better, but still a ways to go:

t/pmc/structview.t             (Wstat: 0 Tests: 16 Failed: 1)
  Failed test:  8

So now the test file is completing with one error. Surprisingly, here on Darwin/PPC we simply get a failure on test 8. But, as reported in TT #2030, we get a PANIC there!

kid51

in reply to: ↑ 5   Changed 4 years ago by plobsing

Replying to jkeenan:

Better, but still a ways to go: {{{ t/pmc/structview.t (Wstat: 0 Tests: 16 Failed: 1) Failed test: 8 }}}

This problem should be addressed in b11a3ca.

So now the test file is completing with one error. Surprisingly, here on Darwin/PPC we simply get a failure on test 8. But, as reported in TT #2030, we get a PANIC there! kid51

  Changed 4 years ago by gerd

  • cc gerd added

  Changed 4 years ago by jkeenan

  • patch set to applied

make test PASS for me at 4629233bb1d1. No objection from me to closing the ticket.

Thank you very much.

kid51

  Changed 4 years ago by plobsing

  • status changed from new to closed
  • resolution set to fixed
Note: See TracTickets for help on using tickets.