Re: Bitcoind

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;
}
マルッティ・マルミのメール(2010年2月28日 04:12 UTC)

dddデバッガーで自分のbitcoindビルドのデバッグを試みましたが、まだうまく いっていません。常にシステムのメモリーをすべて使い切って、最終的にクラッシュ します。問題が自分のビルドに起因するものか確認したいので、最新の64ビット版 bitcoindのビルドをもう一度送ってもらえますか?

原文ソース

https://mmalmi.github.io/satoshi/
2024 年 2 月、COPA 対ライト裁判の証言の一環として GitHub で公開

他の外部ソース