Skip to content

Conversation

timpalpant
Copy link
Contributor

@timpalpant timpalpant commented Aug 7, 2019

vmprof_common.h gets included on OS X, resulting in multiple definitions of _PyThreadState_Current. This definition is only needed in vmprof_win.c, so move it there.

I pip installed and ran pytest on the platforms I have available (OS X and Linux). Unfortunately, I don't have access to a Windows machine to test it.

Fixes #197 and #189

@om26er
Copy link

om26er commented Feb 2, 2020

@timpalpant Could you rebase this on top of master and see if the CI likes that ?

@NyanKiyoshi
Copy link

@timpalpant could you try to rebase whenever you have a second?

@mattip
Copy link
Contributor

mattip commented Mar 4, 2020

Any thoughts why two of the windows builds are failing?

Comment on lines +107 to +117
/* Seems that CPython 3.5.1 made our job harder. Did not find out how
to do that without these hacks. We can't use PyThreadState_GET(),
because that calls PyThreadState_Get() which fails an assert if the
result is NULL. */
#if PY_MAJOR_VERSION >= 3 && !defined(_Py_atomic_load_relaxed)
/* this was abruptly un-defined in 3.5.1 */
void *volatile _PyThreadState_Current;
/* XXX simple volatile access is assumed atomic */
# define _Py_atomic_load_relaxed(pp) (*(pp))
#endif

Copy link

@NyanKiyoshi NyanKiyoshi Mar 4, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like it might be supposed to be inside vmprof_win.h instead of vmprof_win.c has it is used by _vmprof.c?

@NyanKiyoshi
Copy link

@mattip seems like master has the same issues, so just ignore it https://ci.appveyor.com/project/planrich/vmprof-python/builds/31240621

@mattip mattip merged commit 36898b0 into vmprof:master Mar 4, 2020
@mattip
Copy link
Contributor

mattip commented Mar 4, 2020

thanks, merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

pip install vmprof failed, duplicated symbol
5 participants