Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[libffi] fix crash in debug #12498

Merged
merged 3 commits into from
Aug 5, 2020
Merged

Conversation

Mixaill
Copy link
Contributor

@Mixaill Mixaill commented Jul 20, 2020

Disable runtime stack check for libffi.

Fixes #10230

(cherry picked from commit 78b3f05731556e23ad8f1ef8b168ad99cc1c4a9c)
@JackBoosY JackBoosY added the category:port-bug The issue is with a library, which is something the port should already support label Jul 21, 2020
@LilyWangL LilyWangL added the info:reviewed Pull Request changes follow basic guidelines label Jul 22, 2020
@rglbssw
Copy link
Contributor

rglbssw commented Jul 22, 2020

Looks fine! As far as I can see it solves the issue for x64-windows. On x86-windows the source code causing the crash resides in the file ffi.c, not in ffiw64.c.
I tried to provide a similar patch for this file. For my project it seems to work. Please have a look at rglbssw@db2473d.
(You may use the MSVS-Projects I uploaded to the issue to test the behaviour on both targets.)

@NancyLi1013
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@jrbarne1
Copy link

Tried this with VS2019 for the x64 patch and getting the following when running vcpkg intall gtkmm:x64-windows

-- Using cached E:/new_vcpkg/downloads/libffi-libffi-v3.3.tar.gz
-- Extracting source E:/new_vcpkg/downloads/libffi-libffi-v3.3.tar.gz
-- Applying patch win64-disable-stackframe-check.patch
CMake Error at scripts/cmake/vcpkg_apply_patches.cmake:51 (message):
Applying patch failed. error: corrupt patch at line 43

Call Stack (most recent call first):
scripts/cmake/vcpkg_extract_source_archive_ex.cmake:141 (vcpkg_apply_patches)
scripts/cmake/vcpkg_from_github.cmake:139 (vcpkg_extract_source_archive_ex)
ports/libffi/portfile.cmake:3 (vcpkg_from_github)
scripts/ports.cmake:79 (include)

Error: Building package libffi:x64-windows failed with: BUILD_FAILED

@NancyLi1013
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@NancyLi1013
Copy link
Contributor

@jrbarne1
Please check if the patch is correct on your local.

@NancyLi1013 NancyLi1013 added the info:reviewed Pull Request changes follow basic guidelines label Aug 4, 2020
@strega-nil
Copy link
Contributor

This looks good to me, and it works on my machine.

@strega-nil strega-nil merged commit 98fb277 into microsoft:master Aug 5, 2020
hellozee pushed a commit to hellozee/vcpkg that referenced this pull request Sep 11, 2020
* [libffi] fix crash in debug

(cherry picked from commit 78b3f05731556e23ad8f1ef8b168ad99cc1c4a9c)

* Update CONTROL

* [libffi] fix crash in debug (x86-windows)

Co-authored-by: Lily <47812810+LilyWangL@users.noreply.github.com>
Co-authored-by: Rolf Gebhardt <rolf.gebhardt@lbs-sw.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:port-bug The issue is with a library, which is something the port should already support info:reviewed Pull Request changes follow basic guidelines
Projects
None yet
Development

Successfully merging this pull request may close these issues.

libffi:x86-windows crashes since update to version 3.3 on february 7th
7 participants