Error at line 16, column 1 in file glssim.pc
EXEC SQL
1
PCC-S-02201, Encountered the symbol "exec sql begin" when expecting one of the following:
Syntax error at line 0, column 0, file glssim.pc:
Error at line 0, column 0 in file glssim.pc
PCC-S-02201, Encountered the symbol "eof" when expecting one of the following:
an identifier, end-exec, random_terminal
Error at line 0, column 0 in file glssim.pc
PCC-F-02102, Fatal error while doing C preprocessing
I think the problem is related to exec library but I need to know where's it and where to add it.
thank you for your reply I am using proc command, I solved this issue,
by changing the order of the sys_include librairies in configuration file.
Now I have an other issue : the compiler is not recognizing functions
e.g : int function (void);
int function(){
some code
}
the compiler is saying Encountered the symbol {
when expecting one of the following ;= ([
It was due to function prototypes defined, in a header file, for wich the body was not defined.
Then the precompiler is waiting for their definitions, when it faces new functions it complains.
I just deleted the useless function prototypes. and it works fine
Related
I got really strange behavior in Gradle. I didn't change anything and it stop works.
It show this error:
startup failed:
build file 'D:\project\modules\view\build.gradle': 45: expecting ')', found '}' # line 45, column 1.
}
^
1 error
Open File
This is how my gradle.build looks like:
And this is my pathingJar task, I have also no idea why it's marked as yellow (it wasn't before and i'm pretty sure i didn't change anything)
Does someone know an reason?
The if in boot is missing a )
if(Os.isFamily(Os.FAMILY_WINDOWS)) // the last ')' was missing
{
// code omitted
}
So I am using Visual Studio 2015 and some online library I found,and in the sample project everything is working, but when i make my own, I get errors.
Errors are found in file cmath.
When i build my project i get
'abs' , 'pow' , 'abs' , 'acos' , ..., second C linkage of overloaded function not allowed.
How can i fix this ? I tried setting
Properties->General->Project Defaults -> Character set to Use Multi-Byte Character Set or No set, but still get errors.
Thanks !
Note 1:
It looks like inside file cmath there are two functions of each mathematical function that make problem like:
_Check_return_ inline double abs(_In_ double _Xx) _NOEXCEPT
{
return (_CSTD fabs(_Xx));
}
_Check_return_ inline float abs(_In_ float _Xx) _NOEXCEPT
{
return (_CSTD fabsf(_Xx));
}
Why are there two of these functions and why would this represent a problem ?
File was .cpp and library was for C. So this made some errors, after changing extension of file to .c errors dissapeared
TL;DR
How to find where exactly vim or nvim error started (which file?) when I'm interested in fixing the actual issue and not just removing the bad plugin? Anything better than strace and guesswork to find the error origin?
Issue
I often add a plugin to my vim or nvim config and end up getting errors on hooks (buffer open, close, write):
"test.py" [New] 0L, 0C written
Error detected while processing function 343[12]..272:
line 8:
E716: Key not present in Dictionary: _exec
E116: Invalid arguments for function get(a:args, 'exec', a:1['_exec'])
E15: Invalid expression: get(a:args, 'exec', a:1['_exec'])
The problem is, I have no idea where those come from, only get some line number of unknown file and I know it's not my vim/nvim config file.
Somewhere, you have a plugin that has defined a dictionary with anonymous-functions (check the help related to this tag).
For the curious ones, it's done this way:
let d = {}
function! d.whatever() abort
throw "blah"
endfunction
When you execute this function, you'll get the kind of error you're currently observing. That's why I stopped working this way to prefer:
let d = {}
function s:whatever() abort
throw "blah"
endfunction
let d.whatever = function('s:whatever') " a workaround is required for older versions of vim
" At least this way I'll get a `<SNR>42_whatever` in the exception throwpoint, and thus a scriptname.
That's the why. Now, back to your problem, AFAIK, the only things you'll be able to know are the two functions that have been called:
in line 12 of :function {343}, you've called
:function {272} which contains an error at line 8.
Thanks to these two commands (may be prefixed with :verbose, I don't remember exactly), you'll get the source code of the two functions, which you should be able to use in order to grep your plugins to know where it appears.
I'm currently doing a python course through Security Tube. I've currently got stuck on one module where I have to run a Python script through XP and execute it through Immunity Debugger with a process in front of it.
Here's the code:
#!/usr/bin/python2.7
import immlib
DESC="Find Instructions"
def main(args) :
imm = immlib.Debugger()
assembledInstruction = imm.assemble (' ' .join(args))
if not assembledInstruction :
return "[-] No Instruction Given!"
addressList = imm.search(assembledInstruction)
td = imm.createTable("Instruction Locations", ['Module', 'Base Address', 'Instruction Address', 'Instruction']
for address in addressList :
# Get module for this address
module = imm.findModule(address)
if not module:
imm.log("Address 0x%08X not in any module" %address)
# Get module object by name. Please note we are not checking for page properties.
# exercises? :)
instruction = ''
numArgs = len(' '.join(args).split('\n'))
for count in range(0, numArgs) :
instruction += imm.disasmForward(address, nlines=count).getDisasm() + ''
td.add(0, [ module[0],
str('0x%08X'%module[1])
str('0x%08X'%address),
instruction
])
I've saved the .py file as spse-find.py. From there I log on to my XP through Virtual Box, open Immunity Debugger, execute Server-strcpy.exe. At the bottom of the program, I type in:
!spse-find jmp ecp
But upon this being executed I receive the following error:
pycommands: error importing module.
I've placed this in the Security Tube forums but the only thing which I've been told is that I should check the code syntax to ensure it's correct and to ensure that I'm following the video correctly. I've made the checks at least 4 or 5 times. I haven't received any further replies from them since that and so I was wondering if anyone would be able to provide me with any further insight to where I've gone wrong or where more code needs to be added.
Running your code, I get a SyntaxError:
C:\Users\kevin>test.py
File "C:\Users\kevin\test.py", line 20
for address in addressList :
^
SyntaxError: invalid syntax
This message is misleading, because that line is error-free. But sometimes the reported line number is off by one, so let's look at the previous line:
td = imm.createTable("Instruction Locations", ['Module', 'Base Address', 'Instruction Address', 'Instruction']
This is a syntax error. You are missing a closing parenthesis. It should be:
td = imm.createTable("Instruction Locations", ['Module', 'Base Address', 'Instruction Address', 'Instruction'])
Running the program again, we get:
C:\Users\kevin>test.py
File "C:\Users\kevin\test.py", line 38
str('0x%08X'%address),
^
SyntaxError: invalid syntax
This is another red herring. You forgot a comma on line 37.
str('0x%08X'%module[1])
Should be
str('0x%08X'%module[1]),
That should fix all of your syntax errors. (I can't vouch for the correctness of the program at run time, however, since I don't have the immlib library.)
Using immunity debugger is complicated to find out what is going on. The best way is calling the pycommand without the .py extension. That is, if your pycommand is correctly placed under the PyCommands folder and it is called "example.py", using the command bar at the bottom of the grafical interface you should call the pycommand in this way: !example --> instead of !example.py. The second option will compile the code and just tell you something is wrong, the first one will parse the content and tell you the line which is causing the script to fail.
I hope it helps.
Regards.
I have a custom error handler set up using set_error_handler. When I tried to include a file that doesn't exist, PHP calls error_handler one more time than it should:
<?php
error_reporting(E_ALL | E_STRICT);
set_error_handler(function($errno, $errstr, $errfile, $errline, $errcontext){
if(error_reporting() !== 0){
echo "<br>";
echo "<br>In Custom Error Handler...";
echo "<br>Err String: ", $errstr;
echo "<br>Passing to Default Handler...";
}
return false; // allow default
});
include("/missing_file.php"); // line 11
?>
Output:
In Custom Error Handler... // this is the extra error handler call
Err String: include(/missing_file.php)
[function.include]: failed to open stream: No such file or directory
Passing to Default Handler...
// the default handler does nothing, even though error_reporting is not zero
// Next Phase:
In Custom Error Handler...
Err String: include() [function.include]: Failed
opening '/missing_file.php' for inclusion
(include_path='.:/usr/lib/php:/usr/local/lib/php')
Passing to Default
Handler...
Warning: include() [function.include]: Failed opening
'/missing_file.php' for inclusion
in
/home/yccom/public_html/apr/test.php on line 11
The same behavior is observed with require.
For example, changing line 11 to require will give this output:
In Custom Error Handler... // this is the extra error handler call
Err String: require(/missing_file.php) [function.require]: failed to
open stream: No such file or directory
Passing to Default Handler...
// the default handler does nothing, even though error_reporting is
not zero
// Next Phase:
Fatal error: require() [function.require]: Failed opening required '/missing_file.php' in /home/yccom/public_html/apr/test.php on
line 11
What may be causing the error handler's additional call?
It's quite simple, really. PHP's lifecycle consists of 4 distinct phases:
Parsing
Compilation
Scanning
Execution
for your code to be parsed, all files that are included/required need to be fetched in the first phase, to translate the code into meaningful expressions. Your file doesn't exist, so a warning is issued.
Next, the compilation phase encounters the same include statement, and tries to convert the expressions into opcodes. The file doesn't exist, so a warning is issued.
Scanning translates code into tokens, which again cannot be done for the missing include file.
Execution time... The file cannot be executed because it is missing.
Why would PHP work like this? Isn't it stupid to blunder along, eventhough a file is missing?
In a way, yes, but include is used to include files that are non-critical to the script, if you really need that file's contents, you use require (but preferably require_once). The latter emits, as you stated, a fatal error, and stops everything dead in its tracks. That's what should happen if you're depending on another file for your code to function.
The require construct issues an E_COMPILER_ERROR, which effectively halts the compiler (not unlike __halt_compiler) at a given offset(the line where the failing require statement resides).
Check these slides for more details on each of the 4 main phases.
The reason why your code emits four warnings, is simply because PHP tries to include the file four times. Try running the script from the command line, but use strace:
$ strace -o output.txt php yourScript.php
open the output file, and see the internals of the Zend engine. Pay special attention to lines that look like:
lstat("/your/path/./file.php", 0x50113add8355) = -1//0x5... ~= 0xsomeaddress
You'll see where PHP goes looking for the file: it's all its include_path directories, the cwd, /usr/share/php, probably a pear or lib directory, and the include path you explicitly set.
I've gotten the idea to do this from this site, and based on the output I got, this seems to me to be the most plausible explanation as to why you see multiple errors.