bitcoin.org/download/linux64-0.2.7.1.tar.gzに置いた。取得したら削除して構わない。
あなたが経験している問題の原因について考え、このビルドにはその変更を含めた。これは安全でないコードだった可能性があるが、おそらく常にたまたまうまく動いていたのだろう。
util.cppで、旧コード:
const char* wxGetTranslation(const char* pszEnglish)
{
// Wrapper of wxGetTranslation returning the same const char* type
as was passed in
static CCriticalSection cs;
CRITICAL_BLOCK(cs)
{
// Look in cache
static map<string, char*> mapCache;
map<string, char*>::iterator mi = mapCache.find(pszEnglish);
if (mi != mapCache.end())
return (*mi).second;
// wxWidgets translation
const char* pszTranslated =
wxGetTranslation(wxString(pszEnglish, wxConvUTF8)).utf8_str();
// We don't cache unknown strings because caller might be
passing in a
// dynamic string and we would keep allocating memory for each
variation.
if (strcmp(pszEnglish, pszTranslated) == 0)
return pszEnglish;
// Add to cache, memory doesn't need to be freed. We only
cache because
// we must pass back a pointer to permanently allocated memory.
char* pszCached = new char[strlen(pszTranslated)+1];
strcpy(pszCached, pszTranslated);
mapCache[pszEnglish] = pszCached;
return pszCached;
}
return NULL;
}
新コード:
const char* wxGetTranslation(const char* pszEnglish)
{
// Wrapper of wxGetTranslation returning the same const char* type
as was passed in
static CCriticalSection cs;
CRITICAL_BLOCK(cs)
{
// Look in cache
static map<string, char*> mapCache;
map<string, char*>::iterator mi = mapCache.find(pszEnglish);
if (mi != mapCache.end())
return (*mi).second;
// wxWidgets translation
wxString strTranslated = wxGetTranslation(wxString(pszEnglish,
wxConvUTF8));
// We don't cache unknown strings because caller might be
passing in a
// dynamic string and we would keep allocating memory for each
variation.
if (strcmp(pszEnglish, strTranslated.utf8_str()) == 0)
return pszEnglish;
// Add to cache, memory doesn't need to be freed. We only
cache because
// we must pass back a pointer to permanently allocated memory.
char* pszCached = new char[strlen(strTranslated.utf8_str())+1];
strcpy(pszCached, strTranslated.utf8_str());
mapCache[pszEnglish] = pszCached;
return pszCached;
}
return NULL;
}
まだこのコードが怪しいと思う場合は、テスト用に以下のように変更できる:
const char* wxGetTranslation(const char* pszEnglish)
{
return pszEnglish;
}
mmalmi@cc.hut.fi wrote:
dddデバッガーで自分のbitcoindビルドのデバッグを試みましたが、まだうまく いっていません。常にシステムのメモリをすべて使い切って、最終的にクラッシュ します。問題が自分のビルドに起因するものか確認したいので、最新の64ビット版 bitcoindのビルドをもう一度送ってもらえますか?
出典:COPA対ライト裁判の証言の一環として、2024年2月にマルッティ・マルミによりGitHubで公開。完全な書簡アーカイブはmmalmi.github.io/satoshi/で閲覧可能。