Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Adélie Package Tree
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
fraser kendall
Adélie Package Tree
Commits
f7f7951d
Verified
Commit
f7f7951d
authored
4 years ago
by
Anna Wilcox
Browse files
Options
Downloads
Patches
Plain Diff
user/llvm8: Fix segfault while building Rust crates
parent
2d217d05
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
user/llvm8/APKBUILD
+4
-2
4 additions, 2 deletions
user/llvm8/APKBUILD
user/llvm8/scc-insertion.patch
+33
-0
33 additions, 0 deletions
user/llvm8/scc-insertion.patch
with
37 additions
and
2 deletions
user/llvm8/APKBUILD
+
4
−
2
View file @
f7f7951d
...
...
@@ -6,7 +6,7 @@ _pkgname=llvm
pkgver
=
8.0.1
_majorver
=
${
pkgver
%%.*
}
pkgname
=
$_pkgname$_majorver
pkgrel
=
0
pkgrel
=
1
pkgdesc
=
"Low Level Virtual Machine compiler system, version
$_majorver
"
arch
=
"all"
options
=
"!checkroot !dbg"
...
...
@@ -25,6 +25,7 @@ source="https://github.com/llvm/llvm-project/releases/download/llvmorg-$pkgver/l
more-secure-plt.patch
even-more-secure-plt.patch
python3-test.patch
scc-insertion.patch
"
builddir
=
"
$srcdir
/
$_pkgname
-
$pkgver
.src"
...
...
@@ -233,4 +234,5 @@ caeec8e4dbd92f5f74940780b69075f3879a267a8623822cbdc193fd14706eb089071e3a5a20d60c
e5ddbc4b6c4928e79846dc3c022eb7928aaa8fed40515c78f5f03b8ab8264f34f1eb8aa8bfc0f436450932f4917e54ad261603032092ea271d9590f11a37cf1e musl-ppc64-elfv2.patch
7ba7f5b396e1afb49ea53fdc16729f0709fbba88de433cc8a8e2f751d13733011d4121318f68d7f8a16a6c57c3a1bee727cc3e0da0f5c6cae38eff70d3a539cf more-secure-plt.patch
deb71762721ebc73bfdf23143b582f40c70eddcef3e337ed14499e8e336bee2906292d38d64fe98fa633430c1bcb66cf6a2e067258c8fbe6e931f99f6d10a6f7 even-more-secure-plt.patch
53cc0d13dd871e9b775bb4e7567de4f9a97d91b8246cd7ce74607fd88d6e3e2ab9455f5b4195bc7f9dbdedbc77d659d43e98ec0b7cd78cd395aaea6919510287 python3-test.patch"
53cc0d13dd871e9b775bb4e7567de4f9a97d91b8246cd7ce74607fd88d6e3e2ab9455f5b4195bc7f9dbdedbc77d659d43e98ec0b7cd78cd395aaea6919510287 python3-test.patch
4422a83ea953a6b30cb447a448d246956abd6b0cbd2451247e5f2c41318b2c0d18c7b6781155ea40a5558bbd66e9e1482cec0875d95776545fd0d87356b5e4bd scc-insertion.patch"
This diff is collapsed.
Click to expand it.
user/llvm8/scc-insertion.patch
0 → 100644
+
33
−
0
View file @
f7f7951d
From f7e9f4f4c50245d10ca9869a9f8f3d431dfb6948 Mon Sep 17 00:00:00 2001
From: Warren Ristow <warren_ristow@playstation.sony.com>
Date: Tue, 14 Jan 2020 10:30:24 -0800
Subject: [PATCH] SCC: Allow ReplaceNode to safely support insertion
If scc_iterator::ReplaceNode is inserting a new entry in the map,
rather than replacing an existing entry, the possibility of growing
the map could cause a failure. This change safely implements the
insertion.
Reviewed By: probinson
Differential Revision: https://reviews.llvm.org/D72469
---
include/llvm/ADT/SCCIterator.h | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/include/llvm/ADT/SCCIterator.h b/include/llvm/ADT/SCCIterator.h
index eb1a5d0938cf..1e642b9f75d3 100644
--- a/include/llvm/ADT/SCCIterator.h
+++ b/include/llvm/ADT/SCCIterator.h
@@ -134,7 +134,10 @@
class scc_iterator : public iterator_facade_base<
/// has been deleted, and \c New is to be used in its place.
void ReplaceNode(NodeRef Old, NodeRef New) {
assert(nodeVisitNumbers.count(Old) && "Old not in scc_iterator?");
- nodeVisitNumbers[New] = nodeVisitNumbers[Old];
+ // Do the assignment in two steps, in case 'New' is not yet in the map, and
+ // inserting it causes the map to grow.
+ auto tempVal = nodeVisitNumbers[Old];
+ nodeVisitNumbers[New] = tempVal;
nodeVisitNumbers.erase(Old);
}
};
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment