-
Notifications
You must be signed in to change notification settings - Fork 34
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
Mac OS X 10.10.4: Tests Fail (Perl 5.20.2) #34
Comments
Please manually run the following command and paste the output of the failing test: |
|
Are you familiar with C++? |
@wbraswell - I'm experiencing the same issue in OS X that @dshadow is experiencing. I'm more of a C dev than C++, but if you can tell me what you're looking for, i'm happy to grab back-traces or variable values for you from the debugger. |
This is the failing test: Line 146 in aece050
This is the call to nonprint() which is supposed to return the correct value: Line 134 in aece050
This is the definition of the nonprint() method, which should return "Object(0x...)" Line 100 in aece050
This works just fine in Linux (and apparently also Windows), but not in Macintosh. So yes, please help me debug this! |
So far I have determined that the behavior is the same regardless of Inline::CPP or cutting the C++ out and writing a small main(). I will mess around with the raw C++ in the debugger this evening and see if I can figure out where the value is going. I'm almost wondering if the pointer to oretval is being garbage collected when it goes out of scope from the function returning because it's being cast from a const char* to a char* I will continue investigating this evening and let you know what I find. int main ()
{
Airplane ap;
char* foo = ap.nonprint();
cout << foo;
return 0;
} |
I swapped out the char* and c_str() for plain strings, and everything works fine in C++. The original version of nonprint returned nothing, as seen in the test. The compiler in use here is clang: Apple LLVM version 7.0.0 (clang-700.0.72) #include <iostream>
#include <sstream>
using namespace std;
/* Abstract class (interface) */
class Object {
public:
virtual string nonprint() { ostringstream oretval; oretval << "Object (" << this << ")"; string ret = oretval.str(); return ret; }
};
class Airplane : public Object {
public:
Airplane() {}
~Airplane() {}
};
int main(void)
{
Airplane ap;
string val = ap.nonprint();
cout << val;
return 0;
} However, when I directly drop this into the test (see commit cd021f9), I get a failure to eval because there is no method called nonprint:
Any thoughts on where to go from here, @wbraswell? |
The error is unchanged with the RPerl 1.2 release, and latest release of Mac OS X tools: Apple LLVM version 7.0.0 (clang-700.1.76) On the bright side, it is still the only error... |
This may be a bug in Inline::CPP, we shall have to wait and see what the I::CPP team says. |
It does indeed pass all tests, and installs on my system just fine. Will experiment a bit with it, see if any issues arise. |
Good to hear so far, please keep me posted! |
may be fixable using new typemap documentation: |
cpanm (App::cpanminus) 1.7027 on perl 5.020002 built for darwin-2level
The text was updated successfully, but these errors were encountered: