on MIPS64 we have "ZZZZZZZZ" instead of "/bin/sh", for example:
https://people.freebsd.org/~br/kyua_mips/bin_cat_cat_test_align.html
Using strdup helps
Differential D7952
fix atf on MIPS64 br on Sep 19 2016, 1:15 PM. Authored by Tags None Referenced Files
Subscribers
Details
on MIPS64 we have "ZZZZZZZZ" instead of "/bin/sh", for example: Using strdup helps
Diff Detail
Event TimelineComment Actions it comes from conversion from C++ std::string to C const char * using c_str() This C++ function returns the correct value "/bin/sh": const char *a; a = atf_env_get_with_default(name.c_str(), default_value.c_str()); printf("a is %s\n", a); return (a); } but then we converting it to C using c_str() here: We use GCC 4.2.1 on MIPS, may be this is a reason ?
Comment Actions Note that this is not a workaround: this is a proper fix for broken code.
|