1 From 0c963550412174a4c4fe64aa7f70189998abef41 Mon Sep 17 00:00:00 2001
2 From: Peter Lemenkov <lemenkov@gmail.com>
3 Date: Thu, 15 Apr 2010 13:31:36 +0400
4 Subject: [PATCH 6/9] Fix shared libraries installation
6 Several shared libraries (asn1_erl_drv.so, megaco_flex_scanner_drv_mt.so,
7 megaco_flex_scanner_drv.so, wxe_driver.so) were installed as data files
10 Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
12 lib/asn1/c_src/Makefile | 2 +-
13 lib/megaco/src/flex/Makefile.in | 2 +-
14 lib/wx/c_src/Makefile.in | 2 +-
15 3 files changed, 3 insertions(+), 3 deletions(-)
17 diff --git a/lib/asn1/c_src/Makefile b/lib/asn1/c_src/Makefile
18 index 906c513..9e9cb18 100644
19 --- a/lib/asn1/c_src/Makefile
20 +++ b/lib/asn1/c_src/Makefile
21 @@ -124,7 +124,7 @@ include $(ERL_TOP)/make/otp_release_targets.mk
24 $(INSTALL_DIR) $(RELSYSDIR)/priv/lib
25 - $(INSTALL_DATA) $(SHARED_OBJ_FILES) $(RELSYSDIR)/priv/lib
26 + $(INSTALL_PROGRAM) $(SHARED_OBJ_FILES) $(RELSYSDIR)/priv/lib
27 $(INSTALL_DIR) $(RELSYSDIR)/c_src
28 $(INSTALL_DATA) $(C_FILES) $(RELSYSDIR)/c_src
30 diff --git a/lib/megaco/src/flex/Makefile.in b/lib/megaco/src/flex/Makefile.in
31 index 6ce9b34..5af651d 100644
32 --- a/lib/megaco/src/flex/Makefile.in
33 +++ b/lib/megaco/src/flex/Makefile.in
34 @@ -280,7 +280,7 @@ release_spec: opt
35 $(INSTALL_DATA) $(TARGET_FILES) $(RELSYSDIR)/ebin
36 ifeq ($(ENABLE_MEGACO_FLEX_SCANNER),true)
37 $(INSTALL_DATA) $(FLEX_FILES) $(C_TARGETS) $(RELSYSDIR)/src/flex
38 - $(INSTALL_DATA) $(SOLIBS) $(RELSYSDIR)/priv/lib
39 + $(INSTALL_PROGRAM) $(SOLIBS) $(RELSYSDIR)/priv/lib
43 diff --git a/lib/wx/c_src/Makefile.in b/lib/wx/c_src/Makefile.in
44 index 5a0b4ce..8710641 100644
45 --- a/lib/wx/c_src/Makefile.in
46 +++ b/lib/wx/c_src/Makefile.in
47 @@ -167,7 +167,7 @@ release_spec: opt
48 $(INSTALL_DIR) $(RELSYSDIR)/priv/$(SYS_TYPE)
49 $(INSTALL_DATA) ../priv/erlang-logo32.png $(RELSYSDIR)/priv/
50 $(INSTALL_DATA) ../priv/erlang-logo64.png $(RELSYSDIR)/priv/
51 - $(INSTALL_DATA) $(TARGET_DIR)/$(TARGET_API)$(SO_EXT) $(RELSYSDIR)/priv/$(SYS_TYPE)
52 + $(INSTALL_PROGRAM) $(TARGET_DIR)/$(TARGET_API)$(SO_EXT) $(RELSYSDIR)/priv/$(SYS_TYPE)
59 From 6ffccff36e0d94cba0412cf3a29769b4a19d3be3 Mon Sep 17 00:00:00 2001
60 From: Peter Lemenkov <lemenkov@gmail.com>
61 Date: Fri, 16 Apr 2010 21:13:47 +0400
62 Subject: [PATCH 7/9] Fix for dlopening libGL and libGLU
64 Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
66 lib/wx/c_src/wxe_gl.cpp | 4 ++--
67 1 files changed, 2 insertions(+), 2 deletions(-)
69 diff --git a/lib/wx/c_src/wxe_gl.cpp b/lib/wx/c_src/wxe_gl.cpp
70 index 63dd68f..36bf15f 100644
71 --- a/lib/wx/c_src/wxe_gl.cpp
72 +++ b/lib/wx/c_src/wxe_gl.cpp
73 @@ -81,7 +81,7 @@ int initOpenGL()
74 WCHAR * DLName = wxT("opengl32.dll");
75 HMODULE LIBhandle = LoadLibrary(DLName);
77 - char * DLName = (char *) "libGL.so";
78 + char * DLName = (char *) "libGL.so.1";
79 void * LIBhandle = dlopen(DLName, RTLD_LAZY);
81 // fprintf(stderr, "Loading GL: %s\r\n", (const char*)DLName);
82 @@ -132,7 +132,7 @@ int initOpenGL()
83 DLName = wxT("glu32.dll");
84 LIBhandle = LoadLibrary(DLName);
86 - DLName = (char *) "libGLU.so";
87 + DLName = (char *) "libGLU.so.1";
88 LIBhandle = dlopen(DLName, RTLD_LAZY);
90 // fprintf(stderr, "Loading GL: %s\r\n", (const char*)DLName);
94 From d496ce48940411976617b66a5c941c78313cb78c Mon Sep 17 00:00:00 2001
95 From: Michael Santos <michael.santos@gmail.com>
96 Date: Thu, 18 Mar 2010 20:08:10 -0400
97 Subject: [PATCH 8/9] Fix check for compile workspace overflow
100 http://vcs.pcre.org/viewvc/code/trunk/pcre_compile.c?r1=504&r2=505&view=patch
103 N = 819, re:compile([lists:duplicate(N, $(), lists:duplicate(N, $))]).
105 Compiling large regular expressions could overflow the workspace
106 buffer. Modify the test to check for a value smaller than the buffer
109 erts/emulator/pcre/pcre_compile.c | 9 +++++++--
110 1 files changed, 7 insertions(+), 2 deletions(-)
112 diff --git a/erts/emulator/pcre/pcre_compile.c b/erts/emulator/pcre/pcre_compile.c
113 index 2974336..9508c5a 100644
114 --- a/erts/emulator/pcre/pcre_compile.c
115 +++ b/erts/emulator/pcre/pcre_compile.c
116 @@ -92,6 +92,11 @@ is 4 there is plenty of room. */
118 #define COMPILE_WORK_SIZE (4096)
120 +/* The overrun tests check for a slightly smaller size so that they detect the
121 +overrun before it actually does run off the end of the data block. */
123 +#define WORK_SIZE_CHECK (COMPILE_WORK_SIZE - 100)
126 /* Table for handling escaped characters in the range '0'-'z'. Positive returns
127 are simple data values; negative values are for special things like \d and so
128 @@ -2445,7 +2450,7 @@ for (;; ptr++)
130 if (code > cd->hwm) cd->hwm = code; /* High water info */
132 - if (code > cd->start_workspace + COMPILE_WORK_SIZE) /* Check for overrun */
133 + if (code > cd->start_workspace + WORK_SIZE_CHECK) /* Check for overrun */
135 *errorcodeptr = ERR52;
137 @@ -2494,7 +2499,7 @@ for (;; ptr++)
138 /* In the real compile phase, just check the workspace used by the forward
141 - else if (cd->hwm > cd->start_workspace + COMPILE_WORK_SIZE)
142 + else if (cd->hwm > cd->start_workspace + WORK_SIZE_CHECK)
144 *errorcodeptr = ERR52;