-
Notifications
You must be signed in to change notification settings - Fork 750
Fix Py_Main/PySys_SetArgvEx(...) UCS4/PY3 no mem #399
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
Fix Py_Main/PySys_SetArgvEx(...) UCS4/PY3 no mem #399
Conversation
@vmuriart will this cherry pick include @dmitriyse in the commit history? |
I didn't cherry pick this commit in this case. He had re-organized/re-structured his files and was going to be a headache to cherry pick. I gave him credit on the commit message though. @dmitriyse are you ok w this? |
You can just do a Could you or @dmitriyse explain why this fixes the issue? |
c3f5ee5
to
445c4e3
Compare
@filmor good call. Fixed and pushed. |
Codecov Report
@@ Coverage Diff @@
## master #399 +/- ##
==========================================
- Coverage 63.53% 63.45% -0.09%
==========================================
Files 60 60
Lines 5222 5257 +35
Branches 858 860 +2
==========================================
+ Hits 3318 3336 +18
- Misses 1684 1701 +17
Partials 220 220
Continue to review full report at Codecov.
|
@filmor I'll let @dmitriyse since he figured it out. My best educated guess is that the encoding was breaking for |
This code definitely needs comments on how these unmanaged strings are manually built. I'm surprised that it has to be so convoluted. Why can't we just use PyString_* methods? |
@denfromufa I have some work to refactor that logic. We have about 3 different variations of this same thing, each variation being used atleast twice. When I tried refactoring earlier, I was having issues that either the memory was being freed-up too early or never at all. We do the same thing on I settled for this |
@vmuriart can you point to "3 different variations of this same thing, each variation being used atleast twice."? |
445c4e3
to
0314334
Compare
@filmor I took a closer look at the issue and I was on the right track. Currently we don't distinguish between the two different encoding, and fails to work on I'm working on an that being said, @filmor @denfromufa any objections to merging this then? |
Hi! There is a problem with ICustomMarshaler - it's not supported by CoreCLR. Please consider to use two Methods solution: First Method - is interop; Second method - is interop wrapper with marshaling inside. |
Ups, i am worng. |
0314334
to
9512475
Compare
@dmitriyse your first comment scared me. You posted it just has I was finishing writing the 2nd |
Based on @dmitriyse work on: dmitriyse@8a70f09
9512475
to
8ff338a
Compare
What does this implement/fix? Explain your changes.
Fix Py_Main & PySys_SetArgvEx execution on PY3/UCS4 (Linux).
Does this close any currently open issues?
N/A
Any other comments?
Based on @dmitriyse's work.
dmitriyse@8a70f09
Checklist
Check all those that are applicable and complete.
AUTHORS