Ticket #1046 (new bug)

Opened 12 years ago

Last modified 11 years ago

Configure.pl allows sizeof(INTVAL) != sizeof(void *), but parrot requires them to be equal.

Reported by: doughera Owned by:
Priority: normal Milestone:
Component: configure Version: 1.6.0
Severity: medium Keywords:
Cc: Language:
Patch status: Platform:

Description

See  Original RT for more details.

On Linux/x86, the problem can be reproduced by running

perl Configure.pl --intval="long long int" --opcode="long long int"

Change History

in reply to: ↑ description ; follow-up: ↓ 2   Changed 12 years ago by jkeenan

Replying to doughera:

See  Original RT for more details. On Linux/x86, the problem can be reproduced by running

{{{ perl Configure.pl --intval="long long int" --opcode="long long int" }}}

I reproduced this tonight. Configure.pl told me:

auto::sizes -         Determine some sizes...
Hmm, I see your chosen INTVAL isn't the same size as your pointers.  
Parrot should still compile and run, but you may see a ton of warnings.
............................done.

... and I did indeed get a ton of warnings. But then Parrot failed to build:

./parrot -o runtime/parrot/library/PCT/HLLCompiler.pbc 
  compilers/pct/src/PCT/HLLCompiler.pir
/usr/local/bin/perl -e "" > compilers/pge/PGE/builtins_gen.pir
./parrot -o runtime/parrot/library/PGE.pbc compilers/pge/PGE.pir
./parrot runtime/parrot/library/PGE/Perl6Grammar.pir 
  --output=compilers/pge/PGE/builtins_gen.pir compilers/pge/PGE/builtins.pg
make: *** [runtime/parrot/library/PGE.pbc] Segmentation fault
make: *** Deleting file `runtime/parrot/library/PGE.pbc'
Finished

(Of course, the build failure may have been due to the inappropriateness of those command-line options for my box.)

So, would the proper course of action be to require that sizeof(INTVAL) == sizeof(void *)?

Thank you very much.

kid51

in reply to: ↑ 1 ; follow-up: ↓ 3   Changed 12 years ago by jkeenan

Replying to jkeenan:

Replying to doughera: [snip] So, would the proper course of action be to require that sizeof(INTVAL) == sizeof(void *)?

Can anyone shed any light on the issues raised in this ticket?

Thank you very much.

kid51

in reply to: ↑ 2 ; follow-ups: ↓ 4 ↓ 5   Changed 12 years ago by doughera

Can anyone shed any light on the issues raised in this ticket?

I suspect it could go either way. Either Configure.pl could be altered to require those sizes to be the same, or parrot could be altered to allow them to be different. I suspect sentiment leans towards altering Configure.pl, but I think it would be wise to check whether sizeof(long) == sizeof(void *) on all target platforms (including Win64) before proceeding.

in reply to: ↑ 3   Changed 12 years ago by darbelo

Replying to doughera:

Can anyone shed any light on the issues raised in this ticket?

I suspect it could go either way. Either Configure.pl could be altered to require those sizes to be the same, or parrot could be altered to allow them to be different. I suspect sentiment leans towards altering Configure.pl, but I think it would be wise to check whether sizeof(long) == sizeof(void *) on all target platforms (including Win64) before proceeding.

I agree that it can go either way and I think we should put some thought into making sure we pick the right way now, so we don't have to go back later. As an extra data-point, this is what auto::sizes has to say about this.

Hmm, I see your chosen INTVAL isn't the same size as your pointers.  Parrot
should still compile and run, but you may see a ton of warnings.

It's quite easy to miss in the midst of the Configure output, but to me, indicates the original intent clearly. Is this something we still want to support?

in reply to: ↑ 3   Changed 11 years ago by jkeenan

Replying to doughera:

I suspect it could go either way. Either Configure.pl could be altered to require those sizes to be the same, or parrot could be altered to allow them to be different. I suspect sentiment leans towards altering Configure.pl, but I think it would be wise to check whether sizeof(long) == sizeof(void *) on all target platforms (including Win64) before proceeding.

Any win64 users who could comment here?

Thanks.

kid51

Note: See TracTickets for help on using tickets.