Bug on file JITDebugRegister file. it's take effect to LLVMjit cannot build sub project success. In ClamAV version 0.98.1.

Chatsiri Rattana <[email protected]>
Newsgroups gmane.comp.security.virus.clamav.devel
Message-ID <CADPrLxLJekoL5-UJhfwGgvjktLvZpPUuNEi_yG7-f37SAUE4Gg@mail.gmail.com>
Hello All,

   I found incorrect code on sub-project LLVMjit. It cannot built source
code success because using std::make_pair<std::string,
jit_code_entry*>(Buffer, JITCodeEntry);   in line 146. Follow line of code
as file name is JITDebugRegister.cpp.

 FnMap[F] = std::make_pair<std::string, jit_code_entry*>(Buffer,
JITCodeEntry);

It should be example code below.

 FnMap[F] = std::pair<std::string, jit_code_entry*>(Buffer, JITCodeEntry);

In declaration variable  FnMap[F] is type definition declares as below in
file name JITDebugRegister.h

typedef DenseMap< const Function*, std::pair<std::string, jit_code_entry*> >
  RegisteredFunctionsMap;

FnMap[F] must lvalue received value std::pair<std::string,
jit_code_entry*>(Buffer, JITCodeEntry); more std::map<T,T2>(), Thus source
code use std::pair<T,T2>() instead std::make_pair(). Program will compiler
source code success.

Example fixed bug in line 14 from my gits:
https://gist.github.com/Chatsiri/11295674

I'm build source code in Microsoft Visual Studio 2013 (Version 12.0.21005.1
REL), Windows 7
Repository : https://github.com/vrtadmin/clamav-devel

Best Regards,
R.Chatsiri.



-- 
:--------------------------------------------------------
_______________________________________________
http://lurker.clamav.net/list/clamav-devel.html
Please submit your patches to our Bugzilla: http://bugs.clamav.net
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.