Skip to content

Commit

Permalink
Fix infinite loop eating the entry block
Browse files Browse the repository at this point in the history
  • Loading branch information
drmortalwombat committed Sep 27, 2023
1 parent e6b8651 commit c98ff08
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 9 deletions.
9 changes: 8 additions & 1 deletion oscar64/NativeCodeGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12762,7 +12762,7 @@ bool NativeCodeBasicBlock::FindSameBlocks(NativeCodeProcedure* nproc)
{
mVisited = true;

if (!mSameBlock)
if (!mSameBlock && this != mProc->mEntryBlock)
{
for (int i = 0; i < nproc->mBlocks.Size(); i++)
{
Expand Down Expand Up @@ -40512,6 +40512,9 @@ void NativeCodeBasicBlock::CheckBlocks(bool sequence)
if (!mVisited)
{
mVisited = true;

assert(this != mProc->mEntryBlock || mNumEntries < 2);

CheckLive();

if (sequence)
Expand Down Expand Up @@ -41823,6 +41826,7 @@ void NativeCodeProcedure::Optimize(void)

RebuildEntry();

assert(mEntryBlock->mNumEntries < 2);
#if 1
if (step > 3)
{
Expand All @@ -41834,6 +41838,8 @@ void NativeCodeProcedure::Optimize(void)
}
}
#endif
RebuildEntry();
assert(mEntryBlock->mNumEntries < 2);

if (step == 4)
{
Expand All @@ -41848,6 +41854,7 @@ void NativeCodeProcedure::Optimize(void)
}

RebuildEntry();
assert(mEntryBlock->mNumEntries < 2);

#if 1
if (step > 3)
Expand Down
2 changes: 1 addition & 1 deletion oscar64/oscar64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ int main2(int argc, const char** argv)

#else
strcpy(strProductName, "oscar64");
strcpy(strProductVersion, "1.26.219");
strcpy(strProductVersion, "1.26.220");

#ifdef __APPLE__
uint32_t length = sizeof(basePath);
Expand Down
8 changes: 4 additions & 4 deletions oscar64/oscar64.rc
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL
//

VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,26,219,0
PRODUCTVERSION 1,26,219,0
FILEVERSION 1,26,220,0
PRODUCTVERSION 1,26,220,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
Expand All @@ -43,12 +43,12 @@ BEGIN
BEGIN
VALUE "CompanyName", "oscar64"
VALUE "FileDescription", "oscar64 compiler"
VALUE "FileVersion", "1.26.219.0"
VALUE "FileVersion", "1.26.220.0"
VALUE "InternalName", "oscar64.exe"
VALUE "LegalCopyright", "Copyright (C) 2021"
VALUE "OriginalFilename", "oscar64.exe"
VALUE "ProductName", "oscar64"
VALUE "ProductVersion", "1.26.219.0"
VALUE "ProductVersion", "1.26.220.0"
END
END
BLOCK "VarFileInfo"
Expand Down
6 changes: 3 additions & 3 deletions oscar64setup/oscar64setup.vdproj
Original file line number Diff line number Diff line change
Expand Up @@ -5686,15 +5686,15 @@
{
"Name" = "8:Microsoft Visual Studio"
"ProductName" = "8:oscar64"
"ProductCode" = "8:{CBCAE13D-B17A-44B2-8FC3-38EE53B02C31}"
"PackageCode" = "8:{75E5F5B4-AE17-4214-ADB6-18D9177E8E1B}"
"ProductCode" = "8:{532AC6ED-3D25-48DC-91FD-DBE96AF0026F}"
"PackageCode" = "8:{9C57F5C1-1D7C-4915-8DD9-DFE81E950DCA}"
"UpgradeCode" = "8:{9AB61EFF-ACAC-4079-9950-8D96615CD4EF}"
"AspNetVersion" = "8:2.0.50727.0"
"RestartWWWService" = "11:FALSE"
"RemovePreviousVersions" = "11:TRUE"
"DetectNewerInstalledVersion" = "11:TRUE"
"InstallAllUsers" = "11:FALSE"
"ProductVersion" = "8:1.26.219"
"ProductVersion" = "8:1.26.220"
"Manufacturer" = "8:oscar64"
"ARPHELPTELEPHONE" = "8:"
"ARPHELPLINK" = "8:"
Expand Down

0 comments on commit c98ff08

Please sign in to comment.