paulhodge / eastl Goto Github PK
View Code? Open in Web Editor NEWObsolete repo, please go to: https://github.com/electronicarts/EASTL
Obsolete repo, please go to: https://github.com/electronicarts/EASTL
The latest released EAWebKit is 12.4.2.2.2, with updated EASTL, release last year. Located at http://gpl.ea.com/simcity.html
The following code segfaults
#define EASTL_EXCEPTIONS_ENABLED 1
#include <EASTL/string.h>
int main() {
try {
eastl::string( size_t(-1), 'a' );
} catch( const std::length_error& ) {
}
return 0;
}
void* operator new[] (size_t size, const char*, int, unsigned, const char*, int)
{
return (void*)::new char[size];
}
void* operator new[] (size_t size, size_t, size_t, const char*, int, unsigned, const char*, int)
{
return (void*)::new char[size];
}
@paulhodge
cpp conference rumours about a faster version of EASTL to be released as open source. Can you confirm? Would this be uploaded here? cheers
NY
The following code produces a segfault and may be considered a bug. The use of basic_string::npos
is a little questionable here, but one can imagine such use to show up in syntax parsing.
#include <EASTL/string.h>
#include <cassert>
int main() {
eastl::string s("abc");
assert( s.find( "a", s.npos ) == s.npos );
return 0;
}
void* operator new[] (size_t size, const char*, int, unsigned, const char*, int)
{
return (void*)::new char[size];
}
void* operator new[] (size_t size, size_t, size_t, const char*, int, unsigned, const char*, int)
{
return (void*)::new char[size];
}
Problem is on eaplatform.h where because 64 bit is not defined will always reach #error Unknown processor
#if defined(EA_PLATFORM_IPHONE) || defined(IPHONE) || (defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE) || (defined(TARGET_IPHONE_SIMULATOR) && TARGET_IPHONE_SIMULATOR)
#undef EA_PLATFORM_IPHONE
#define EA_PLATFORM_IPHONE 1
#define EA_PLATFORM_NAME "iPhone"
#define EA_ASM_STYLE_ATT
#define EA_POSIX_THREADS_AVAILABLE 1
#if defined(arm)
#define EA_PROCESSOR_ARM
#define EA_SYSTEM_LITTLE_ENDIAN
#define EA_PLATFORM_DESCRIPTION "iPhone on ARM"
#elif defined(i386)
#define EA_PLATFORM_IPHONE_SIMULATOR
#define EA_PROCESSOR_X86
#define EA_SYSTEM_LITTLE_ENDIAN
#define EA_PLATFORM_DESCRIPTION "iPhone simulator on x86"
#else
#error Unknown processor
#endif
#define EA_PLATFORM_MOBILE
Since GXX_EXPERIMENTAL_CXX0X is going to ge deprecated C++11 detecting should use __cplusplus
macro(higher than 199711L is C++11).
So EA_COMPILER_IS_CPLUSPLUS_11_ENABLED
is more reliable now.
And EA_COMPILER_IS_CPLUSPLUS_14_ENABLED
needs to get defined.
See http://bobsummerwill.wordpress.com/2014/06/25/ea-open-source-software/
Please could somebody drop me a mail at [email protected]? I'd love to collaborate and have something to show you.
When trying to build a project with EASTL under cygwin I run into this error:
[...]/include/EABase/config/eaplatform.h:461:6: #error Unknown platform
[...]/include/EABase/config/eaplatform.h:462:6: #error Unknown processor
[...]/include/EABase/config/eaplatform.h:463:6: #error Unknown endianness
It seems that on Cygwin only EA_PLATFORM_CYGWIN is defined. Adding EA_PLATFORM_LINUX to the compile switches manually fixes this, but I don't think that's the correct way to do things...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.