SDL-Hercules-390 / hyperion

The SDL Hercules 4.x Hyperion version of the System/370, ESA/390, and z/Architecture Emulator
Other
240 stars 90 forks source link

dasdinit with -nnn (i.e. negative) size parameter creates a huge file #472

Closed fbi-ranger closed 2 years ago

fbi-ranger commented 2 years ago

FBA DASD 3370 has according to the specification 558000 sectors and 512 bytes per sector and result in an file with 272 MB size

$ dasdinit -lfs CMS19E.019E 3370 CMS19E
HHC02499I Hercules utility dasdinit - DASD image file creation program - version 4.4.1.10647-SDL-gd0ccfbc9-modified
HHC01414I (C) Copyright 1999-2022 by Roger Bowler, Jan Jaeger, and others
HHC01417I YBI-15301-10646
HHC01415I Build date: Jan 31 2022 at 16:10:41
HHC00463I 0:0000 CKD file CMS19E.019E: creating 3370 volume CMS19E: 558000 sectors, 512 bytes/sector
HHC00460I 0:0000 CKD file CMS19E.019E: 558000 sectors successfully written
HHC02423I DASD operation completed

Trying to create a DASD with smaller size is possible with specifying the sectors as parameter to dasdinit but doing so leads to a huge file:

$ dasdinit -lfs CMS19E.019E 3370 CMS19E -24000
HHC02499I Hercules utility dasdinit - DASD image file creation program - version 4.4.1.10647-SDL-gd0ccfbc9-modified
HHC01414I (C) Copyright 1999-2022 by Roger Bowler, Jan Jaeger, and others
HHC01417I YBI-15301-10646
HHC01415I Build date: Jan 31 2022 at 16:10:41
HHC00463I 0:0000 CKD file CMS19E.019E: creating 3370 volume CMS19E: 4294943296 sectors, 512 bytes/sector

Which I had to interrupt as it fills up the filesystem. Seems there is a bug in calculating the FBA size.

Small additional remark: HHC00463I should state that according to 3370 device type it allocates a FBA file and not an CKD.

wrljet commented 2 years ago

-24000 is getting scanned as a negative value, which is then used as an unsigned value 4294943296.

Try it without the - sign.

Fish-Git commented 2 years ago

Hi Florian!

Thanks for reporting this! I'll try to get it fixed right away.

Fish-Git commented 2 years ago

FYI:

HHC02499I Hercules utility ...... version 4.4.1.10647-SDL-gd0ccfbc9-modified

I happened to notice your reported version has "-modified" appended to it. I'm guessing this is probably because you did a ./autogen.sh before you did your ./configure and make.   Am I correct?

Presuming I am, I should inform you that autogen is no longer needed when building Hercules. The repository should always contain a valid pre-generated configure script that you can use directly to build Hercules with. There is no need to "generate" (via autogen.sh) a new configure script. The configure script that Hercules comes with should be good enough.

You will still always need to run configure of course. You will still need to do a ./configure ... before doing your make. That has not changed. But you do not need to do (and indeed should NOT do!) a separate ./autogen.sh beforehand.

When you build Hercules without doing an autogen, your version string should say just "4.4.1.10647-SDL-gd0ccfbc9" (i.e. without "-modified" appended), indicating your Hercules is a pristine, unmodified version of Hercules.

When we see someone using a "-modified" version of Hercules, we cannot be sure what they modified. We cannot be 100% sure they didn't make their own custom modifications to Hercules.

When the version is reported without the "-modified" string (as it should be), then we can be 100% sure the user is indeed running the version of Hercules that we think they are.

Does that make sense?

Fish-Git commented 2 years ago

Fixed by commit 1431f765fcbf21533d494f88d4251ca407823280.

Closing.

fbi-ranger commented 2 years ago

Hi Fish,

That makes absolutely sense. Indeed in my automation script for building Hyperion I have a autogen.sh as it was needed. I will remove it and rebuild it.

BR Florian

Fish-Git @.***> schrieb am Do., 10. Feb. 2022, 20:29:

FYI:

HHC02499I Hercules utility ...... version 4.4.1.10647-SDL-gd0ccfbc9-modified

I happened to notice your reported version has "-modified" appended to it. I'm guessing this is probably because you did a ./autogen.sh before you did your ./configure and make. Am I correct?

Presuming I am, I should inform you that autogen is no longer needed when building Hercules. The repository should always contain a valid pre-generated configure script that you can use directly to build Hercules with. There is no need to "generate" (via autogen.sh) a new configure script. The configure script that Hercules comes with should be good enough.

You will still always need to run configure of course. You will still need to do a ./configure ... before doing your make. That has not changed. But you do not need to do (and indeed should NOT do!) a separate ./autogen.sh beforehand.

When you build Hercules without doing an autogen, your version string should say just "4.4.1.10647-SDL-gd0ccfbc9" (i.e. without "-modified" appended), indicating your Hercules is a pristine, unmodified version of Hercules.

When we see someone using a "-modified" version of Hercules, we cannot be sure what they modified. We cannot be 100% sure they didn't make their own custom modifications to Hercules.

When the version is reported without the "-modified" string (as it should be), then we can be 100% sure the user is indeed running the version of Hercules that we think they are.

Does that make sense?

— Reply to this email directly, view it on GitHub https://github.com/SDL-Hercules-390/hyperion/issues/472#issuecomment-1035391538, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABESU6BGMXRZAO5HDE4K3T3U2QG27ANCNFSM5OAO5SZQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you authored the thread.Message ID: @.***>