Comments (27)
On Wed, Dec 18, 2013 at 10:51 PM, Markus Elfring
[email protected]:
I have looked at a few source files for your current software. I have
noticed that some checks for return codes are missing.Would you like to add more error handling for return values from functions
like the following?
- mallochttp://pubs.opengroup.org/onlinepubs/9699919799/functions/malloc.html=>
MCOperand_CreateReghttps://github.com/aquynh/capstone/blob/39da42692de1431814fb0202907d5b48a74f3b14/MCInst.c#L153- strduphttp://pubs.opengroup.org/onlinepubs/9699919799/functions/strdup.html=>
Mips_printInsthttps://github.com/aquynh/capstone/blob/24ca24c5dbad62c4cd4809e6020ade877afc28fd/arch/Mips/MipsInstPrinter.c#L154definitely yes, these issues should be addressed. please send patch, or
pull request.
thanks.
Reply to this email directly or view it on GitHubhttps://github.com//issues/42
.
from capstone.
Are you interested to apply aspect-oriented software development?
How do you think about to encapsulate error detection and corresponding exception handling as a reusable aspect in your software?
from capstone.
On Wed, Dec 18, 2013 at 10:54 PM, Markus Elfring
[email protected]:
Are you interested to apply aspect-oriented software developmenthttp://aspectc.org/
?
How do you think about to encapsulate error detection and corresponding
exception handling as a reusable aspecthttp://en.wikipedia.org/wiki/Aspect_%28computer_programming%29in your software?Please could you elaborate on what you want to implement with this Aspect
approach?
I prefer to keep it simple, since this issue is simple, anyway.
Thanks.
from capstone.
Would you like to read any of the linked information sources?
from capstone.
On Wed, Dec 18, 2013 at 11:42 PM, Markus Elfring
[email protected]:
Would you like to read any of the linked information sources?
i took a look, but not really experienced about this AOP stuff. perhaps it
is easier if you can go ahead to implement your solution, as clean as
possible, then i can comment on the code?
thanks.
from capstone.
Markus, if you do this, please work on the "next" branch, where the next
version is based on.
See https://github.com/aquynh/capstone/wiki/ChangeLog
Thanks.
On Thu, Dec 19, 2013 at 10:51 PM, Nguyen Anh Quynh [email protected] wrote:
On Wed, Dec 18, 2013 at 11:42 PM, Markus Elfring <[email protected]
wrote:
Would you like to read any of the linked information sources?
i took a look, but not really experienced about this AOP stuff. perhaps it
is easier if you can go ahead to implement your solution, as clean as
possible, then i can comment on the code?thanks.
from capstone.
Are you willing to cooperate with another software development tool which can scan through your source files where specific adjustments (advice) should be applied automatically?
from capstone.
On Fri, Dec 20, 2013 at 12:50 AM, Markus Elfring
[email protected]:
Are you willing to cooperate with another software development tool which
can scan through your source files where specific adjustments should be
applied automatically?
yes you make me curious. if the generated code is clean enough, then we can
accept it, with some modifications.
thanks.
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/42#issuecomment-30944933
.
from capstone.
A traditional approach for adding error detection is the specification of some checks in the source code manually. Are you willing to delegate such a source file maintenance task to an evolving software development tool like "AspectC++"?
from capstone.
On Fri, Dec 20, 2013 at 1:00 AM, Markus Elfring [email protected]:
A traditional approach for adding error detection is the specification of
some checks in the source code manually. Are you willing to delegate such a
source file maintenance task to an evolving software development tool like
"AspectC++"?
yes, lets see how that goes. i hope the resulted code is clean enough.
otherwise, i prefer manual code.
thanks.
from capstone.
How do you think about to introduce also a higher level build tool like CMake or Autotools for your software?
from capstone.
If you just need a configure script for handwritten makefiles you can use ACR.
I dont think cmake or autotools is necessary for this project. Building a single library file is an easy task and we dont need higher abstractions.
But we will need to fix the makefiles because right now you have to make clean in otder to build without issues..
On 22 Dec 2013, at 10:18, Markus Elfring [email protected] wrote:
How do you think about to introduce also a higher level build tool like CMake or Autotools?
—
Reply to this email directly or view it on GitHub.
from capstone.
I am a bit more concerned about a consistent handling for library portability. I am also curious which "make file" will be a really good base for the concrete reuse of AspectC++ here.
from capstone.
On Sun, Dec 22, 2013 at 5:27 PM, radare [email protected] wrote:
If you just need a configure script for handwritten makefiles you can use
ACR.I dont think cmake or autotools is necessary for this project. Building a
single library file is an easy task and we dont need higher abstractions.But we will need to fix the makefiles because right now you have to make
clean in otder to build without issues..agreed on avoiding autotools, but perhaps CMake is good, because we also
want to support MS Visual Studio: CMake can generate VS project easily.
thanks.
from capstone.
I guess that the discussion for the build system selection should be continued with an other issue.
from capstone.
Cmake is an awful project, lot of issues for crosscompiling. It's bloated and adds another dependency to the build, because not everyone have cmake installed. (Not to mention its c++)
The only good thing i see in cmake is that allows to create visual studio projects, but, as long as C support in visual studio is a pure crap I would suggest using ming32 builds for the windows users and im not sure if maintaining a handcrafted visual studio project file would be too much work.. But cs is a very simple project, so the build shouldnt be complex.
On 22 Dec 2013, at 12:30, Markus Elfring [email protected] wrote:
I guess that the discussion for the build system selection should be continued with an other issue.
—
Reply to this email directly or view it on GitHub.
from capstone.
On Sun, Dec 22, 2013 at 9:00 PM, radare [email protected] wrote:
Cmake is an awful project, lot of issues for crosscompiling. It's bloated
and adds another dependency to the build, because not everyone have cmake
installed. (Not to mention its c++)The only good thing i see in cmake is that allows to create visual studio
projects, but, as long as C support in visual studio is a pure crap I would
suggest using ming32 builds for the windows users and im not sure if
maintaining a handcrafted visual studio project file would be too much
work.. But cs is a very simple project, so the build shouldnt be complex.
agreed, but in the worst case we can maintain CMake & Makefile in parallel.
i think it is not bad if CMake can create VS project for us, so it is more
consistent & better managed in the same code base.
anyway, this is not a top priority at the moment.
thanks.
On 22 Dec 2013, at 12:30, Markus Elfring [email protected]
wrote:I guess that the discussion for the build system selection should be
continued with an other issue.—
Reply to this email directly or view it on GitHub.
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/42#issuecomment-31086948
.
from capstone.
The document "AC++ Compiler Manual 1.7" contains the following information.
5.2.7 Support for Plain C Code Currently ac++ generates C++ code, which cannot be compiled by a C compiler.
Is this detail compatible with your software configuration?
from capstone.
On Mon, Dec 23, 2013 at 12:31 AM, Markus Elfring
[email protected]:
The document "AC++ Compiler Manual 1.7"http://aspectc.org/fileadmin/documentation/ac-compilerman.pdfcontains the following information.
5.2.7 Support for Plain C Code
Currently ac++ generates C++ code, which cannot be compiled by a C
compiler.Is this detail compatible with your software configuration?
Capstone is in pure C, and there is absolutely no C++ at all.
Thanks.
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/42#issuecomment-31090490
.
from capstone.
How do you generally think about to cooperate with source code transformations where the target can eventually contain C++ constructs?
from capstone.
no, Capstone would never get C++ code, and that is one of the key "feature"
of this project.
thanks.
On Mon, Dec 23, 2013 at 12:44 AM, Markus Elfring
[email protected]:
How do you generally think about to cooperate with source code
transformations where the target can eventually contain C++ constructs?—
Reply to this email directly or view it on GitHubhttps://github.com//issues/42#issuecomment-31090756
.
from capstone.
may i suggest to use assert or something that calls that?
from capstone.
I do not like the macro "assert" here because return value checking will be omitted again if the preprocessor symbol "NDEBUG" would be defined.
from capstone.
On Oct 11, 2014 2:55 AM, "Markus Elfring" [email protected] wrote:
I do not like macro "assert" here because return value checking will be
omitted again if the preprocessor symbol "NDEBUG" would be defined.
The only nice way to get rid of this issue is to remove all the dynamic
malloc in the middle of the code & replace them with equiv code using
static memory. if anybody wants to fix this, just find all the remaining
code and fix them.
Thanks
from capstone.
then why not using the stack directly? for Mips_printInst should work fine.
For MCOperand_CreateReg not.
[edit] i haven't seen the aquynh answer... on the "next" branch it's fixed!
from capstone.
On Tue, Oct 14, 2014 at 4:00 AM, Giovanni [email protected] wrote:
then why not using the stack directly? for Mips_printInst should work fine.
yes, please feel free to fix it, then make a Pull-Request.
For MCOperand_CreateReg not.
make sure you are using the latest code (from the "next" branch), since
MCOperand_CreateReg is gone, and all the related code switched away from
heap memory long ago.
thanks.
from capstone.
Close this issue for now because of legacy, we are preparing to release Capstone 5.0, plz feel free to open a new issue if that still has this issue.
thx :)
from capstone.
Related Issues (20)
- Invalid information for ARM memory operand on next HOT 2
- Remove or update java and ocaml bindings HOT 1
- Issue in detail feature for ARM post-incrementing ldrb/strb instructions HOT 1
- Pip install capstone doesn't work HOT 2
- [AArch64] SME instructions with indexed operands do not have correct disassembly information HOT 4
- Python binding lost mem operands of arm64 Insn by capstone v5.0.1 HOT 4
- Is this a BUG or am I using it incorrectly? HOT 3
- Is there a stable [next] version available? HOT 2
- Add SPDX copyright headers to all files
- HPPAMapping.c:422:43: error: comparison between ‘hppa_reg’ and ‘enum hppa_op_type’ [-Werror=enum-compare]
- MacOS wheel only contains x86_64 version of the libcapstone.dylib despite the package claims to be universal HOT 1
- Got abnormal behavior when set CS_OPT_DETAIL_REAL without CS_OPT_ON
- Can capstone recognize fmv.w.x instruction in RISCV ? HOT 3
- HPPADisassembler.c unitialized variables
- Incorrect/Missing Python Binding for operands within the X86-64 STOS Instruction
- Ensure API is properly documented before `v6`
- Use proper versioning on CMakeLists.txt - pkgconf versions are wrong otherwise HOT 1
- [BPF] `bpf_insn` collides with `libbpf` definition. HOT 13
- Build failure on Windows with MSVC \ capstone_static.vcxproj HOT 4
- HPPADisassembler: more unitialized variables HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from capstone.