Projects
openEuler:24.03
llvm
_service:tar_scm:0013-Backport-Bitcode-Add-some...
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:tar_scm:0013-Backport-Bitcode-Add-some-missing-GetTypeByID-failure-checks.patch of Package llvm
From 58f4b115f97435efa1df1baa3247791a13444c00 Mon Sep 17 00:00:00 2001 From: Nikita Popov <npopov@redhat.com> Date: Tue, 26 Sep 2023 16:51:40 +0200 Subject: [PATCH 1/3] [Bitcode] Add some missing GetTypeByID failure checks Print an error instead of crashing. Fixes https://github.com/llvm/llvm-project/issues/67388. --- llvm/lib/Bitcode/Reader/MetadataLoader.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/llvm/lib/Bitcode/Reader/MetadataLoader.cpp b/llvm/lib/Bitcode/Reader/MetadataLoader.cpp index 0a9a80688a41..2f024899b451 100644 --- a/llvm/lib/Bitcode/Reader/MetadataLoader.cpp +++ b/llvm/lib/Bitcode/Reader/MetadataLoader.cpp @@ -1315,7 +1315,7 @@ Error MetadataLoader::MetadataLoaderImpl::parseOneMetadata( unsigned TyID = Record[0]; Type *Ty = Callbacks.GetTypeByID(TyID); - if (Ty->isMetadataTy() || Ty->isVoidTy()) { + if (!Ty || Ty->isMetadataTy() || Ty->isVoidTy()) { dropRecord(); break; } @@ -1366,7 +1366,7 @@ Error MetadataLoader::MetadataLoaderImpl::parseOneMetadata( unsigned TyID = Record[0]; Type *Ty = Callbacks.GetTypeByID(TyID); - if (Ty->isMetadataTy() || Ty->isVoidTy()) + if (!Ty || Ty->isMetadataTy() || Ty->isVoidTy()) return error("Invalid record"); Value *V = ValueList.getValueFwdRef(Record[1], Ty, TyID, -- 2.33.0
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2