Hi,
I fail to cross-compile pdlua on Debian for W32. This is my error:
$ i586-mingw32msvc-gcc -I/lua-5.1.2/src/ -I./ -I/usr/include/ -shared lua5.1.dll pd.dll -o lua.dll lua.c
/tmp/ccobudhL.o:lua.c:(.text+0x1bc4): undefined reference to `_class_set_extern_dir'
/tmp/ccobudhL.o:lua.c:(.text+0x1c65): undefined reference to `_class_set_extern_dir'
/tmp/ccobudhL.o:lua.c:(.text+0x1c92): undefined reference to `_class_set_extern_dir'
/tmp/ccobudhL.o:lua.c:(.text+0x1e09): undefined reference to `_sys_register_loader'
Info: resolving _s_ by linking to __imp__s_ (auto-import)
collect2: ld returned 1 exit status
This is with the precompiled lua5.1.dll from
http://luabinaries.luaforge.net/download.html and the precompiled
pd.dll from Miller's site, both 0.41 and 0.40 give the same error.
I could remove the "_class_set_extern_dir" stuff from lua.c, but I'm
quite sure that "_sys_register_loader" is important.
Any ideas how to fix this?
Ciao
--
Frank Barknecht _ ______footils.org__
Patches item #1848356, was opened at 2007-12-10 21:29
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=478072&aid=1848356&group_…
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: externals
Group: None
Status: Open
Resolution: None
Priority: 5
Private: Yes
Submitted By: Russell Bryant (russellbryant)
Assigned to: Nobody/Anonymous (nobody)
Summary: streamin/streamout doc updates, bugs, and a security issue
Initial Comment:
This issue has been marked private as it includes details on a remotely exploitable buffer overflow vulnerability in the code for [streamin~].
A while ago, I was looking around at different options for streaming audio in and out of Pd. I spent a short time looking at the code for [streamin~] and [streamout~]. I ended up not using them for my project. However, I made this set of changes while looking at the code.
Since I moved on to something else, these changes aren't exactly complete, but point out some important things, so I think they may be worth putting in as is.
Here is a summary of the changes that are included.
stream.h changes:
1) doxygen style documentation updates
2) added an ifdef to protect against multiple or recursive inclusion of the header
3) Documentation of some of the fields in the data structures
4) Fixed potential alignment bugs by adding the packed attribute for the structure that defines frame headers. This attribute should always be used when it is used to directly interpret data from the network or when used to prepare data to send directly over the network. This section of the gcc manual has a tidbit about the attribute:
http://gcc.gnu.org/onlinedocs/gcc-4.2.2/gcc/Variable-Attributes.html#Variab…
5) Point out the fact that the code is not endianness-safe. The code should eventually be updated to respect network byte order.
6) Point out that the version field of the frame header is ignored when parsing incoming frames. It should eventually be checked, but doesn't matter much until the format gets changed such that the version number gets bumped.
7) Change a list of #defines to an enum, for the sake of better coding practice.
8) Change the use of "int" in the frame header structure to explicitly list that the field is 32-bits by using the int32_t type.
streamin~.c changes:
1) Fix a remotely exploitable buffer overflow that would allow remote execution of arbitrary code. The frame header includes 4 bytes to specify the frame length. However, the code only allocates enough space for the frame header and 256 bytes of payload data. The size portion of the frame header was not checked to ensure that its value was valid. This little hack should fix it.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=478072&aid=1848356&group_…
Patches item #1848295, was opened at 2007-12-10 18:53
Message generated for change (Comment added) made by russellbryant
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=478072&aid=1848295&group_…
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: puredata
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Russell Bryant (russellbryant)
Assigned to: Nobody/Anonymous (nobody)
Summary: Fix small potential stack overflow
Initial Comment:
Attached is a patch to fix another potential stack buffer overflow in s_main.c. I didn't send this over in private because I don't think it can be exploited in any useful way, so it's just a small bug.
----------------------------------------------------------------------
>Comment By: Russell Bryant (russellbryant)
Date: 2007-12-10 20:41
Message:
Logged In: YES
user_id=1942915
Originator: YES
Also, let me just clarify my original summary just a little bit.
You can cause the overrun of the buffer by providing a really long input
string to the -schedlib command line option. It's just not exploitable in
such a way that it would be considered a security issue.
----------------------------------------------------------------------
Comment By: Russell Bryant (russellbryant)
Date: 2007-12-10 20:38
Message:
Logged In: YES
user_id=1942915
Originator: YES
I'm sorry for the stupid typo. That code is actually only compiled in for
a Windows build (whenever MSW is defined), so I didn't notice.
----------------------------------------------------------------------
Comment By: Russell Bryant (russellbryant)
Date: 2007-12-10 20:36
Message:
Logged In: YES
user_id=1942915
Originator: YES
File Added: filename_overflow.patch2.txt
----------------------------------------------------------------------
Comment By: Hans-Christoph Steiner (eighthave)
Date: 2007-12-10 19:18
Message:
Logged In: YES
user_id=27104
Originator: NO
I am guessing there is a typo in that patch, since the new line also uses
sprintf() instead of snprintf():
- sprintf(filename, "%s.dll", sys_externalschedlibname);
+ sprintf(filename, sizeof(filename), "%s.dll",
sys_externalschedlibname);
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=478072&aid=1848295&group_…
Patches item #1848295, was opened at 2007-12-10 18:53
Message generated for change (Comment added) made by russellbryant
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=478072&aid=1848295&group_…
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: puredata
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Russell Bryant (russellbryant)
Assigned to: Nobody/Anonymous (nobody)
Summary: Fix small potential stack overflow
Initial Comment:
Attached is a patch to fix another potential stack buffer overflow in s_main.c. I didn't send this over in private because I don't think it can be exploited in any useful way, so it's just a small bug.
----------------------------------------------------------------------
>Comment By: Russell Bryant (russellbryant)
Date: 2007-12-10 20:38
Message:
Logged In: YES
user_id=1942915
Originator: YES
I'm sorry for the stupid typo. That code is actually only compiled in for
a Windows build (whenever MSW is defined), so I didn't notice.
----------------------------------------------------------------------
Comment By: Russell Bryant (russellbryant)
Date: 2007-12-10 20:36
Message:
Logged In: YES
user_id=1942915
Originator: YES
File Added: filename_overflow.patch2.txt
----------------------------------------------------------------------
Comment By: Hans-Christoph Steiner (eighthave)
Date: 2007-12-10 19:18
Message:
Logged In: YES
user_id=27104
Originator: NO
I am guessing there is a typo in that patch, since the new line also uses
sprintf() instead of snprintf():
- sprintf(filename, "%s.dll", sys_externalschedlibname);
+ sprintf(filename, sizeof(filename), "%s.dll",
sys_externalschedlibname);
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=478072&aid=1848295&group_…
Patches item #1848295, was opened at 2007-12-10 18:53
Message generated for change (Comment added) made by russellbryant
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=478072&aid=1848295&group_…
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: puredata
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Russell Bryant (russellbryant)
Assigned to: Nobody/Anonymous (nobody)
Summary: Fix small potential stack overflow
Initial Comment:
Attached is a patch to fix another potential stack buffer overflow in s_main.c. I didn't send this over in private because I don't think it can be exploited in any useful way, so it's just a small bug.
----------------------------------------------------------------------
>Comment By: Russell Bryant (russellbryant)
Date: 2007-12-10 20:36
Message:
Logged In: YES
user_id=1942915
Originator: YES
File Added: filename_overflow.patch2.txt
----------------------------------------------------------------------
Comment By: Hans-Christoph Steiner (eighthave)
Date: 2007-12-10 19:18
Message:
Logged In: YES
user_id=27104
Originator: NO
I am guessing there is a typo in that patch, since the new line also uses
sprintf() instead of snprintf():
- sprintf(filename, "%s.dll", sys_externalschedlibname);
+ sprintf(filename, sizeof(filename), "%s.dll",
sys_externalschedlibname);
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=478072&aid=1848295&group_…
Patches item #1848295, was opened at 2007-12-10 19:53
Message generated for change (Comment added) made by eighthave
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=478072&aid=1848295&group_…
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: puredata
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Russell Bryant (russellbryant)
Assigned to: Nobody/Anonymous (nobody)
Summary: Fix small potential stack overflow
Initial Comment:
Attached is a patch to fix another potential stack buffer overflow in s_main.c. I didn't send this over in private because I don't think it can be exploited in any useful way, so it's just a small bug.
----------------------------------------------------------------------
>Comment By: Hans-Christoph Steiner (eighthave)
Date: 2007-12-10 20:18
Message:
Logged In: YES
user_id=27104
Originator: NO
I am guessing there is a typo in that patch, since the new line also uses
sprintf() instead of snprintf():
- sprintf(filename, "%s.dll", sys_externalschedlibname);
+ sprintf(filename, sizeof(filename), "%s.dll",
sys_externalschedlibname);
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=478072&aid=1848295&group_…
Patches item #1848292, was opened at 2007-12-10 19:49
Message generated for change (Comment added) made by eighthave
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=478072&aid=1848292&group_…
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: externals
Group: None
>Status: Deleted
Resolution: None
Priority: 5
Private: No
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: ggee/makefile.sub cleanup and documentation
Initial Comment:
I went looking around through externals. Specifically, I was interested in looking at [streamin~]/[streamout~]. I was also interested in how the externals were being built.
So, while looking at how these externals were built, I made some significant changes to this Makefile.
Changes:
ggee/signal/Makefile:
- Simply add the -f option to rm to avoid errors being sent to the console when files don't exist to get removed.
ggee/makefile.sub:
- Added comments to sections of the Makefile to describe what they are for
- Centralized the handling of CFLAGS and LDFLAGS to one spot so it is clear what is platform specific.
- Re-work the compilation and linking targets so that they use the new handling of the CFLAGS and LDFLAGS.
----------------------------------------------------------------------
>Comment By: Hans-Christoph Steiner (eighthave)
Date: 2007-12-10 20:16
Message:
Logged In: YES
user_id=27104
Originator: NO
hehe, no prob
----------------------------------------------------------------------
Comment By: Russell Bryant (russellbryant)
Date: 2007-12-10 19:51
Message:
Logged In: YES
user_id=1942915
Originator: NO
Please delete this issue ...
I hit refresh on a really old browser window and it re-POSTed this. Oops!
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=478072&aid=1848292&group_…
Patches item #1848295, was opened at 2007-12-10 18:53
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=478072&aid=1848295&group_…
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: puredata
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Russell Bryant (russellbryant)
Assigned to: Nobody/Anonymous (nobody)
Summary: Fix small potential stack overflow
Initial Comment:
Attached is a patch to fix another potential stack buffer overflow in s_main.c. I didn't send this over in private because I don't think it can be exploited in any useful way, so it's just a small bug.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=478072&aid=1848295&group_…
Patches item #1848292, was opened at 2007-12-10 18:49
Message generated for change (Comment added) made by russellbryant
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=478072&aid=1848292&group_…
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: externals
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: ggee/makefile.sub cleanup and documentation
Initial Comment:
I went looking around through externals. Specifically, I was interested in looking at [streamin~]/[streamout~]. I was also interested in how the externals were being built.
So, while looking at how these externals were built, I made some significant changes to this Makefile.
Changes:
ggee/signal/Makefile:
- Simply add the -f option to rm to avoid errors being sent to the console when files don't exist to get removed.
ggee/makefile.sub:
- Added comments to sections of the Makefile to describe what they are for
- Centralized the handling of CFLAGS and LDFLAGS to one spot so it is clear what is platform specific.
- Re-work the compilation and linking targets so that they use the new handling of the CFLAGS and LDFLAGS.
----------------------------------------------------------------------
Comment By: Russell Bryant (russellbryant)
Date: 2007-12-10 18:51
Message:
Logged In: YES
user_id=1942915
Originator: NO
Please delete this issue ...
I hit refresh on a really old browser window and it re-POSTed this. Oops!
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=478072&aid=1848292&group_…
Patches item #1848292, was opened at 2007-12-10 16:49
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=478072&aid=1848292&group_…
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: externals
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: ggee/makefile.sub cleanup and documentation
Initial Comment:
I went looking around through externals. Specifically, I was interested in looking at [streamin~]/[streamout~]. I was also interested in how the externals were being built.
So, while looking at how these externals were built, I made some significant changes to this Makefile.
Changes:
ggee/signal/Makefile:
- Simply add the -f option to rm to avoid errors being sent to the console when files don't exist to get removed.
ggee/makefile.sub:
- Added comments to sections of the Makefile to describe what they are for
- Centralized the handling of CFLAGS and LDFLAGS to one spot so it is clear what is platform specific.
- Re-work the compilation and linking targets so that they use the new handling of the CFLAGS and LDFLAGS.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=478072&aid=1848292&group_…