fix ragel-* command segfault
This commit is contained in:
parent
da94b4e9ee
commit
6f770958a4
@ -0,0 +1,39 @@
|
|||||||
|
From 5482a621c75baad6dee31f5f6a1d38bf5849d4eb Mon Sep 17 00:00:00 2001
|
||||||
|
From: si-gui <245140120@qq.com>
|
||||||
|
Date: Mon, 21 Sep 2020 20:01:10 +0800
|
||||||
|
Subject: [PATCH] Fix ragel-d,ragel-go,ragel-java such command segfault error
|
||||||
|
|
||||||
|
Signed-off-by: si-gui <245140120@qq.com>
|
||||||
|
---
|
||||||
|
src/inputdata.cc | 14 ++++++++++++--
|
||||||
|
1 file changed, 12 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/inputdata.cc b/src/inputdata.cc
|
||||||
|
index 8a6de8b..e6d4f73 100644
|
||||||
|
--- a/src/inputdata.cc
|
||||||
|
+++ b/src/inputdata.cc
|
||||||
|
@@ -1105,9 +1105,19 @@ void InputData::wait( const char *what, pid_t pid )
|
||||||
|
int InputData::rlhcMain( int argc, const char **argv )
|
||||||
|
{
|
||||||
|
pid_t pid = 0;
|
||||||
|
+ int code = 0;
|
||||||
|
+ try {
|
||||||
|
+ parseArgs( argc, argv );
|
||||||
|
+ checkArgs();
|
||||||
|
+
|
||||||
|
+ if ( !process() )
|
||||||
|
+ abortCompile( 1 );
|
||||||
|
+ }
|
||||||
|
+ catch ( const AbortCompile &ac ) {
|
||||||
|
+ code = ac.code;
|
||||||
|
+ return code;
|
||||||
|
+ }
|
||||||
|
|
||||||
|
- parseArgs( argc, argv );
|
||||||
|
- checkArgs();
|
||||||
|
makeDefaultFileName();
|
||||||
|
makeTranslateOutputFileName();
|
||||||
|
|
||||||
|
--
|
||||||
|
2.23.0
|
||||||
|
|
||||||
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
Name: ragel
|
Name: ragel
|
||||||
Version: 7.0.0.12
|
Version: 7.0.0.12
|
||||||
Release: 1
|
Release: 2
|
||||||
Summary: Finite state machine compiler
|
Summary: Finite state machine compiler
|
||||||
|
|
||||||
# aapl/ is the LGPLv2+
|
# aapl/ is the LGPLv2+
|
||||||
@ -24,6 +24,7 @@ BuildRequires: colm-devel
|
|||||||
|
|
||||||
# Unfortunately, upstream doesn't exist and not possible to find version
|
# Unfortunately, upstream doesn't exist and not possible to find version
|
||||||
Provides: bundled(aapl)
|
Provides: bundled(aapl)
|
||||||
|
Patch0000: 0001-Fix-ragel-d-ragel-go-ragel-java-such-command-segfault.patch
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Ragel compiles executable finite state machines from regular languages.
|
Ragel compiles executable finite state machines from regular languages.
|
||||||
@ -76,5 +77,8 @@ install -p -m 0644 -D %{name}.vim %{buildroot}%{_datadir}/vim/vimfiles/syntax/%{
|
|||||||
%{_includedir}/%{name}/
|
%{_includedir}/%{name}/
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Sep 21 2020 Guoshuai Sun <sunguoshuai@huawei.com> - 7.0.0.12-2
|
||||||
|
- Fix ragel-d ragel-go ragel-java eg. command segfault
|
||||||
|
|
||||||
* Mon Jun 22 2020 Yikun Jiang <yikunkero@gmail.com> - 7.0.0.12-1
|
* Mon Jun 22 2020 Yikun Jiang <yikunkero@gmail.com> - 7.0.0.12-1
|
||||||
- Package init
|
- Package init
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user