Windows error 0xFFFFFFFE, -2

Detailed Error Information

HRESULT analysis[1]

FlagsSeverityFailure
Reserved (R)true
OriginCustomer

This code was defined by a third party software company, and may mean different things for different software. Contact the software author for more information about this error.

NTSTATUStrue
Reserved (X)true
FacilityCode4095 (0xfff)
Error Code65534 (0xfffe)

Questions

56votes
5answers

How to use the GDB (Gnu Debugger) and OpenOCD for microcontroller debugging - from the terminal?

The standard (low-cost) way to program ARM microcontrollers is using Eclipse with a complex toolchain plugged into it. Eclipse has definitely its merits, but I'd like to feel independent from this IDE. I'd like to discover what happens behind the scenes when I build (compile - link - flash) my [...] read more
gdb
gnu
jtag
openocd
25votes
7answers

Efficient computation of the average of three unsigned integers (without overflow)

There is an existing question "Average of 3 long integers" that is specifically concerned with the efficient computation of the average of three signed integers. The use of unsigned integers however allows for additional optimizations not applicable to the scenario covered in the previous question. This question is about the [...] read more
c
algorithm
bit-manipulation
micro-optimization
extended-precision
25votes
16answers

Convert a hexadecimal string to an integer efficiently in C?

In C, what is the most efficient way to convert a string of hex digits into a binary unsigned int or unsigned long? For example, if I have 0xFFFFFFFE, I want an int with the base10 value 4294967294. read more
c
performance
hex
strtol
13votes
1answer

Where can I find the log created from a gpusGenerateCrashLog callstack?

In my OpenGL rendering engine I'm currently crashing 1 frame after I press a key that starts issuing some new OpenGL calls. The following is the crashed call stack, which is a CVDisplayLink thread. 0 libsystem_kernel.dylib 0x00007fff94d89f06 __pthread_kill + 10 1 libsystem_pthread.dylib 0x00007fff88d3e4ec pthread_kill + 90 2 libsystem_c.dylib 0x00007fff980246e7 abort [...] read more
macos
opengl
driver
gpu
osx-elcapitan
11votes
1answer

`tiny_malloc_from_free_list` made my pointer `NULL`?

I am working on code that includes bllipparser Python module, among other things. Feeding it the same dataset, it will intermittently crash (maybe once in three to ten runs). Going through lldb, I found that the public field weights of RerankerModel (source), that is apparently only set once (in the [...] read more
python
macos
memory-management
lldb
bllip-parser
9votes
2answers

Measuring clock cycle count on cortex m7

I have been measuring clock cycle count on the cortex m4 and would now like to do it on the cortex m7. The board I use is STM32F746ZG. For the m4 everything worked with: volatile unsigned int *DWT_CYCCNT; volatile unsigned int *DWT_CONTROL; volatile unsigned int *SCB_DEMCR; void reset_cnt(){ DWT_CYCCNT = [...] read more
c
arm
embedded
stm32f7
9votes
3answers

IOS: Play sound while app in background

I working on a little app where i want the phone to play a sound file on an event from my location controller. The problem is when the App is in Background mode the AVAudioPlayer not start the Audio file but the code is scheduled, getting NSLog output. Another thing [...] read more
iphone
ios
avaudioplayer
avaudiosession
8votes
2answers

Branch Prediction at no cost?

I've just stumbled upon this thing, and I'm really curious if maybe modern CPUs (current ones, maybe mobile ones as well (embedded)) don't actually have a branching cost in the situation below. 1.Let's say we have this: x += a; // let's assume they are both declared earlier as simple [...] read more
c++
c
pipeline
branch-prediction
7votes
2answers

Is there an operator precedence problem I'm missing? Compare of unsigned short with inverse fails

I can THINK of why this wouldn't work, but I don't understand why many of the workarounds I've tried don't work. Below is an example of the code I'm trying to make work. The intent should be obvious, but compiling with GCC 7.4.0 for Windows 32 bit, Visual C 32 [...] read more
c++
c
7votes
1answer

What is clang trying to do optimizing this simple recursive algorithm?

Upon writing an answer to this question: Using variable vs. using number I ran clang x86 9.0.0/trunk with -O3 to see if it could do tail-call optimization of this simple code: int faculty1 (const unsigned int n) { return n == 1 ? n : n * faculty1(n - 1); [...] read more
c
assembly
x86
clang
6votes
1answer

Android Unable to instantiate codec 'video/avc'

This is my first post, so bear with me. I'm trying to play raw h264 video onto a Surface object in an android app. I'm using android 5.0.1 on an HTC one. After reading through the android docs, I've found that I need to use a MediaCodec object to decode [...] read more
android
video-streaming
h.264
android-mediacodec
5votes
0answers

Assembly enter protected mode and jump back to real mode

I am developing a toy OS in assembly and I have a problem when switching from protected mode back to real mode. I have successfully switched to protected mode, called the kernel that writes text to [0xb8000] video memory, returned to the caller and (probably) switched back to real mode. [...] read more
assembly
kernel
nasm
x86-16
bootloader
4votes
3answers

Bitwise Operations in C: Can't figure out why XOR does not work. Is my code or logic flawed?

I can only use the bitwise operators mentioned below to create the described function: /* * allEvenBits - return 1 if all even-numbered bits in word set to 1 * Examples allEvenBits(0xFFFFFFFE) = 0, allEvenBits(0x55555555) = 1 * Legal ops: ! ~ & ^ | + << >> * Max [...] read more
c
bit-manipulation
bitwise-operators
4votes
2answers

IIS ApplicationPoolIdentity 503 error

I've recently ported to a different hosting company (VDS), and on the new server, installed IIS 7.5 Express, latest versions of PHP and MySQL. I then copied the files from the old server to new server (NOTHING beyond the content of the folders of my websites, so no config files [...] read more
iis
windows-server-2008-r2
access-rights
4votes
1answer

android epub library, skyepub

I'm triyng to create an epub reader for android, so after a lot of searching I found skyepub library (SDK) . seems it have all features i want. i followed the tut in the site, but after running the code i got a blank screen and different logcat for different [...] read more
android
epub
skyepub
4votes
1answer

External program execution impersonation mode

We've got an legacy CRM system (Server), that uses a mapped network drive. The problem is drive is fully opened for modification by any users. I'm trying to use user impersonation, in c# .net console application (Client A). 1. Client A execute an .exe program (console application), that makes impersonation [...] read more
c#
.net
impersonation
3votes
4answers

Creating a bridged WiFi AP (hotspot) in Centos 8 (or Fedora)

I am trying to create a bridged WiFi hotspot on a Centos 8 system, using NetworkManager. The machine is Dell EPC3000, with two built-it GigE's and ath10k wireless adapter, plus an LTE WWAN. Creating a NATted hotspot works nicely: nmcli con add type wifi ifname wlp4s0 con-name wlp4s0 autoconnect yes [...] read more
wifi
fedora
bridge
access-point
centos8
3votes
3answers

Signed/unsigned mismatch compare

#include <stdio.h> int main() { int a = -2; // 0xFFFFFFFE unsigned int b = 1; // 0x00000001 if ((int)a > (int)b) printf("(int)a > (int)b;\n"); else printf("(int)a < (int)b;\n"); if ((unsigned int)a > (unsigned int)b) printf("(unsigned int)a > (unsigned int)b;\n"); else printf("(unsigned int)a < (unsigned int)b;\n"); if (a > b) [...] read more
c
unsigned
signed
3votes
2answers

Unknown type name uint32/uint16

In this header file, I am getting error: unknown type name uint32, uint16. I am new to Objective-C and I am trying to import a project in Xcode. Build is failing due to the above issues. Google didn't help.Tried adding /stdint/stdint.h in header search path ( xcode unknown type name, [...] read more
objective-c
xcode
xcode4.2
3votes
3answers

Get overflow from arithmetic operations

When doing a math operation, how can I get the part that overflowed? For example, assuming 32-bit ints: unsigned int a = 0Xffffffff; unsigned int b = 0xffffffff; unsigned int c = a + b; In this case, c is 0xfffffffe, but the answer should be 0x1fffffffe. How do I [...] read more
c
math
integer-overflow
3votes
1answer

Flash and debug STM32F7 discovery with openocd

I recently bought an STM32F7 discovery board [1], and I am therefore trying to flash it using openocd, since the board has an embedded st-link debugger. I have my toolchain working (I am using makefiles and arm-none-eabi-gcc), but I would like to flash the board using eclipse so I can [...] read more
debugging
embedded
microcontroller
stm32
openocd
2votes
2answers

W3WP recycle return codes

I have an IIS6 machine, running multiple web applications. Once in a while, IIS recycles W3WP. When i look at the error codes, W3WP.exe usually exits with return code -2 (0xfffffffe) but one in a while it exits with -3 (0xfffffffd). While the end result is the same, i was [...] read more
iis-6
iis
2votes
2answers

Normalizing a two complement number

I am working on some Tensilica processor and I don't understand the normalization process. NSA - Normalized Shift Amount Usage: NSA at, as NSA calculates the left shift amount that will normalize the twos complement contents of address register as and writes this amount (in the range 0 to 31) [...] read more
assembly
binary
normalization
twos-complement
fixed-point
2votes
1answer

stm32 factory bootloader possibly overwritten with openocd?

tl;dr: flashed firmware to 0x00000000 instead of 0x08000000, am I lost? Hello, my device is based on a STM32F103CBTx which came with a proprietary firmware and had readout protection on. I connect to it with a ST-Link v2 SWDIO and SWCLK connected to PA13 and PA14 and this command: sudo [...] read more
stm32
openocd
2votes
1answer

Running the nnlib test app on the Hexagon HVX DSP

I have tried different versions of nnlibs at codeaurora and used SDK 3.0, 3.2 and 3.3.3 to compile and test them. The closest I got was to use the commit version 7321d49318a33a99e978b18411adee43df7ddaea (Jan 2018) with SDK 3.3.3 and while running the graph_app I receive this helper: $ adb shell /data/graph_app [...] read more
sdk
deep-learning
qualcomm
hexagon-dsp
2votes
1answer

How to suspend and resume VM with VMX

I have worked out a toy hypervisor with VMX in Linux, and it can work well with my testing VM. Now I am trying to test suspend and resume my testing VM with my toy hypervisor. I did followings to suspend the VM. The VM starts in real-mode, and then [...] read more
linux
x86
virtualization
2votes
0answers

High performance CUDA uniform float random number generator within device function

I need a random number generator with high performance that is used for Monte Carlo calculation on particle transport. The requirements are: 1. Independently generated by each thread 2. The period of the generator should be larger than 2^40 I have tried Tausworthe generator(mathematics of computation, 65, 213 (1996), 203-213), [...] read more
algorithm
performance
optimization
cuda
gpu
2votes
3answers

Starting process (one console application from another)

Does anyone knows why I'm getting this error (not every time but sometimes) when trying to start one console application from another. Error: > System.ComponentModel.Win32Exception (0x80004005): Unknown error (0xfffffffe) > at System.Diagnostics.Process.StartWithShellExecuteEx(ProcessStartInfo > startInfo) at System.Diagnostics.Process.Start() this is my Code: System.Diagnostics.Process myProc = new System.Diagnostics.Process(); try { myProc.StartInfo.FileName = @"C:\MyFolder\MyExecutableApplication.exe"; [...] read more
c#
visual-studio-2010
2votes
3answers

Unusual behavior with shift-right bitwise operator

I'm writing a simple code in C (only using bit-wise operators) that takes a pointer to an unsigned integer x and flips the bit at the nth position n in the binary notation of the integer. The function is declared as follows: int flip_bit (unsigned * x, unsigned n); It [...] read more
c
bit-manipulation
2votes
1answer

Catching Stacktraces with Debug Register Breakpoints and Vectored Exception Handling

I've been working on code to attempt to monitor for stack traces and had the idea to try to use debug registers and vectored exception handling (for x86). I've made an example program that will output the address of whatever accesses the current return address. This works if a stack [...] read more
c
assembly
x86
2votes
1answer

Run a batch file as administrator from an standard account in C#

I am developing an application that needs to run a batch file with administrator privileges from a normal person account. It all works fine when I am logged on to the computers administrator account but not in the "test account" without admin privileges. I do get all the information required [...] read more
c#
windows
batch-file
2votes
2answers

Filling a 2GiB file with 0s in C

I am about to do some data processing in C, and the processing part is working logically, but I am having a strange file problem. I conveniently have 32-bits of numbers to consider, so I need a file of 32-bits of 0s, and then I will change the 0 to [...] read more
c
1vote
0answers

How to handle int interruption in real mode? (16 bit)

I am creating an operating system since this summer, it is an 32 bits operating system which work in protected mode. I need to creat a way to make BIOS interrupt so I need to pass in real mode and before in 16bit, I sucessfully pass to 16 bit but [...] read more
assembly
operating-system
x86-16
bios
real-mode
1vote
1answer

ESP32 cam keeps rebooting when PIR sensor is triggered

So some background - I have a esp32 cam with a PIR sensor. The esp is in deep sleep, then is waken up by a PIR sensor (GPIO 13) and the esp takes an image. What I want it to do is then monitor for another 15s for movement. If [...] read more
arduino
camera
esp32
1vote
1answer

MassTransit - Socket exception with AmazonMQ when starting bus

I'm trying to get a basic PoC app running with MassTransit using our Amazon MQ instance, and running into the following problem when I call StartAsync on IBusControl: MassTransit.ActiveMqTransport.ActiveMqConnectException: Connection exception: (user)@(host) ---> Apache.NMS.NMSConnectionException: Error connecting to (host) ---> System.Net.Sockets.SocketException (0xFFFFFFFE): Unknown error (0xfffffffe) at Apache.NMS.ActiveMQ.Transport.Tcp.TcpTransportFactory.DoConnect(String host, Int32 port, String [...] read more
activemq
masstransit
nms
1vote
1answer

Why is the variable allocated the same way in both programs?

I have following code to showcase stack-based buffer overflow. int check_authentication(char *password) { int auth_flag = 0; char password_buffer[16]; strcpy(password_buffer, password); if(strcmp(password_buffer, "Admin") == 0) auth_flag = 1; return auth_flag; } Here when user inputs any string with length greater than 16 will allow access. To show other case of [...] read more
c
memory
gdb
allocation
buffer-overflow
1vote
2answers

unable to compile program due to function asprintf

Found this code, it needed to stop throttling the CPU to 20% in Dell laptops, which occurs due to the power adapter failing to be recognized by the computer. Tried to compile on Kubuntu and got this: warning: implicit declaration of function ‘asprintf’; did you mean ‘vasprintf’? [-Wimplicit-function-declaration] 47 | [...] read more
c
1vote
1answer

'undefined debug reason 7 - target needs reset' Error when debug ARM Cortex-M33 using OpenOCD in FTDI SWD Mode

I am currently using OpenOCD to debug Cortex-M33 processor. However, after it connects to gdb and starts debugging, it shows the following message: Try to search windows process Found openocd running, Kill it SUCCESS: The process "openocd.exe" with PID 18768 has been terminated. Open On-Chip Debugger 0.10.0 Licensed under GNU [...] read more
cortex-m
ftdi
gdbserver
openocd
swd
1vote
2answers

Issue with J-Link debugger while working with bootloader on STM32F765

I'm using the J-Link EDU and STLink debugger present on the Nucleo boards from ST. For testing, the bootloader code is present at 0x8000000 and just jumps to 0x8020000 where the main app code is present. When I use the Jlink EDU, it can't program the flash at 0x8020000 every [...] read more
c
eclipse
debugging
bootloader
segger-jlink
1vote
0answers

Assembly - Carry Flag when negative minus negative

If the CPU treats the subtraction as add like this question. Then (-1) - (-2) should be FF...FF + 00...02, and the CARRY FLAG should be set. I wrote c code to test (-1) - (-2) on linux, but found the CARRY FLAG was not set. How CPU deal with [...] read more
assembly
x86
cpu
alu
eflags
1vote
2answers

Linker file vector table for bootloader setup

I am currently trying to use a bootloader application created using MCUXPresso that requires that my application start address is located at 0x80000. According to the following documentation: enter image description here [https://i.stack.imgur.com/yTwDO.png] However, the .bin I generate is created with Kinetis Design Studio (an earlier version of MCUXpresso) and [...] read more
c
embedded
microcontroller
linker-scripts
1vote
4answers

log2 causes a fault in STM32F4 MCU in C

Why does this code cause hard fault and jumps into infinite loop? #include <stdint.h> #include <math.h> void myfunc() { const double val = 1; double log_res = log2(val); // <----- THIS CAUSES A FAULT //double log_res = log2(1); // This works } When I replace val in the evil line [...] read more
c
arm
stm32
stm32f4
stm32cubeide
1vote
0answers

openocd - problem flashing nrf52 using stlink

I've got some issues flashing firmware using an STLINKv2 (from a Nucleo board) with an nRF52 target device using SWD. In short, I'm able to "connect" to the nRF52 (I can open a telnet session), but as soon as I try a Program command, I get a non-helpful error (below). [...] read more
microcontroller
openocd
nrf52
1vote
1answer

Allocation fails only on release

When debugging the program works how it's supposed to. When running the release version, it tells me I have not enough space. Why is this happening and how can I make it run in the release exe? I found some other article, but I don't get where the similarities are. [...] read more
c
console
windows-10
codeblocks
1vote
0answers

Unknown error (0xfffffffe) while impersonating in C#

C# Impersonate Error Hello, wanted to create an application that would give me privileges to install applications with an user that has such accesses. It's important that the user with elevated privileges would be log onto from inside the application and thats what i've been trying to do but it [...] read more
c#
elevated-privileges
impersonation
1vote
0answers

Tail Call Optimization (TCO) in Clang on O2

I was playing with Tail Call Optimization (TCO) and various optimization levels in clang on godbolt. I have the very simple function (lifted from here): int factorial (int x, int y){ if (x==0) return y; else return factorial(x-1,y*x); } If I set -O1, all is good and I understand the [...] read more
c++
recursion
optimization
clang
tail-recursion
1vote
4answers

Clearing least significant bit

QUESTION How would I change the least significant bit to 0 without affecting the rest of the value, for example: 0xffffffff , for example in C or Python? I am not a mathematical genius, so for me it's a hassle to find out how to achieve this. SOLUTION n = [...] read more
c
bit
1vote
1answer

Eclipse J-Link ATMEL ARM ATSAME70Q21. Debugging when the code starts at a different address than 0x00400000

I am trying to use Eclipse with J-Link on an ATMEL ATSAME70Q21. I am able to debug code perfectly when the code start address is at the default address of 0x00400000. It downloads the code, stops at the main breakpoint, etc. All the debug commands seem to work fine. When [...] read more
c
arm
embedded
1vote
2answers

Bizarre right bitshift inconsistency

I've been working with bits in C (running on ubuntu). In using two different ways to right shift an integer, I got oddly different outputs: #include <stdio.h> int main(){ int x = 0xfffffffe; int a = x >> 16; int b = 0xfffffffe >> 16; printf("%X\n%X\n", a, b); return 0; [...] read more
c
ubuntu
bit-manipulation
bit-shift
1vote
0answers

How do I use heic format in Android P?

HeifEncoder was seen and implemented. "MediaCodec.createEncoderByType(MediaFormat.MIMETYPE_IMAGE_ANDROID_HEIC);" If you do this, the following error will occur. > Blockquote java.lang.IllegalArgumentException: Failed to initialize image/vnd.android.heic, error 0xfffffffe at android.media.MediaCodec.native_setup(Native Method) at android.media.MediaCodec.<init>(MediaCodec.java:1811) at android.media.MediaCodec.createEncoderByType(MediaCodec.java:1777) Is there a way to resolve the error? read more
heif
heic
1vote
0answers

redis-cli unix socket - import rcmd failing

I am using redis server 3.0.6 on ubuntu 16.04 desktop. Installed using apt-get install redis-server It was working fine for a long time. Today, when I tried to import a rcmd file using unix socket in redis-cli I am getting out of memory error. $ sudo redis-cli -s /run/redis/redis.sock < [...] read more
redis
ubuntu-16.04
unix-socket
redis-cli
1vote
4answers

Interleave 4 byte ints to 8 byte int

I'm currently working to create a function which accepts two 4 byte unsigned integers, and returns an 8 byte unsigned long. I've tried to base my work off of the methods depicted by this research but all my attempts have been unsuccessful. The specific inputs I am working with are: [...] read more
c
bit-manipulation
interleave
1vote
0answers

How to create multi frame dicom file using dcm4che from several JPEG images?

I'm developing a DICOM application with dcm4che3, however, I have a problem with multiframe DICOM file. I would like to convert several JPEG images in only one DICOM file (Multiframe DICOm file. I have extracted all the frames from dicom as Jpeg images and masked. I want to set back [...] read more
java
1vote
2answers

How to load wifi firmware in android?

I want to use usb wifi adapter in custom android board, so far I was able to build driver for chipset, and android is able to detect the dongle, and even creates wlan0. But I don't how to load firmware as there is one bin file. When I am trying [...] read more
android-wifi
android-source
android-kernel
1vote
0answers

Stuck on Instruction SVC0 __asm void prvStartFirstTask( void ){...}; in STM32F4

In my project, > boot loader Flash address: 0x08000000 > > application Flash address: 0x08004000 > > Same RAM for boot and app: 0x20000000(IRAM1) and 0x10000000(IRAM2) 1. Separately boot Loader and Application(With or Without FreeRTOS) working fine. 2. Boot Loader and application(Without FreeRTOS) working perfectly. 3. But if i use [...] read more
arm
microcontroller
stm32
freertos
stm32f4discovery
1vote
2answers

Get Currently Opened Word Document from Process

The goal is to get the full path to the document opened in an instance of Microsoft Word that I have a process reference for. Pseudocode Example: Process myWordProcess = something; // This is my process reference DocumentInformation docInfo = SomeNamespace.GetDocumentInformation(myWordProcess); string documentPath = docInfo.FullName; // "C:\User\Foo\Documents\Test.docx" The starting point [...] read more
c#
winapi
com
office-interop
com-interop
1vote
2answers

Maximum Index of an array and it's length on a platform

In C, the index of an array of char can range from 0 to 2 ^ (sizeof(size_t) * CHAR_BITS), but the count of the array's members, is that number plus 1, which can't be hold by a size_t variable. For example, in x86, if sizeof(size_t) is 4, then the index [...] read more
c
arrays
1vote
1answer

How can I use threadlocal variable with ThreadPoolExecutor?

I want to threads has some local variable, with thread.Thread it can be done like this elegantly: class TTT(threading.Thread): def __init__(self, lines, ip, port): threading.Thread.__init__(self) self._lines = lines; self._sock = initsock(ip, port) self._sts = 0 self._cts = 0 def run(self): for line in self._lines: query = genquery(line) length = len(query) [...] read more
python
multithreading
threadpoolexecutor
1vote
3answers

Dumped XML Layout File padding positions not behaving correctly

I've been trying to figure out how to make some sense of a dumped XML layout, and it's progressing 'pretty good'. The only thing I'm currently unsure about is the following: When I use the command: aapt dump xmltree <pathofapk> <pathofxmlfile> I get the following result: N: android=http://schemas.android.com/apk/res/android E: LinearLayout [...] read more
android
1vote
1answer

Very strange segfault calling WinUsb_GetOverlappedResult

I have this code: void GetResult(WINUSB_INTERFACE_HANDLE InterfaceHandle, LPOVERLAPPED lpOverlapped) { DWORD numBytes = 0; WinUsb_GetOverlappedResult( InterfaceHandle, lpOverlapped, &numBytes, TRUE ); return; uint8_t stack[64]; } WinUsb_GetOverlappedResult is a __stdcall function declared as follows: WINBOOL WINAPI WinUsb_GetOverlappedResult (WINUSB_INTERFACE_HANDLE InterfaceHandle, LPOVERLAPPED lpOverlapped, LPDWORD lpNumberOfBytesTransferred, WINBOOL bWait); Compiling in debug mode with GCC 5.3.0 [...] read more
c++
windows
gcc
segmentation-fault
stdcall
1vote
1answer

LDMIA instruction results in corrupt register data

I'm attempting to run a compiled program on a ARM Cortex-M3 bare metal. Before the system even reaches the application code, an odd error blows the program counter away and errors out. Before the instruction, the registers are observed to be: r0 0x0 0 r1 0x1 1 r2 0x0 0 [...] read more
c
gcc
assembly
gdb
cortex-m3
1vote
0answers

LPC4357 jumping to external flash unstable

I have two programs, one is custom bootloader which will be located in BANK A and the other one is the main program which will be located in external spifi flash. Both programs I load and debug from eclipse. Currently I can jump from the bootloader to the main program, [...] read more
bootloader
flash-memory
lpc
1vote
1answer

Copy function from IAR stm32f2/f4 flash to ram and run it

I want to copy a function from Flash to RAM and RUN it. I know that IAR includes the __ramfunc type for functions that allows you to define a function in RAM but i dont want to use it for 2 reasons: * RAM funcs are using RAM memory that [...] read more
stm32
iar
cortex-m3
stm32f4
1vote
1answer

Assembly infinite loop (jmp -2)

I heard that with a jmp -2 we could make an infinite loop. It sounded weird but after the explanation that a relative jump would take one byte, the next instruction address (eip) would be 2 bytes less than the jmp address. So, I decided to implement that but I [...] read more
assembly
nasm
infinite-loop
1vote
0answers

Run exe as impersonated account from vb.net

I am trying to run an exe from another account which has admin rights, I have this so far but its giving me an unknown error (0xfffffffe): Private Shared Function ShowWindow(ByVal hwnd As IntPtr, ByVal nCmdShow As Int32) As Boolean End Function Public Sub RunAsAdmin() Dim tokenHandle As New IntPtr(0) [...] read more
wpf
vb.net
windows-identity
1vote
1answer

"Error reading characters of string" C, Visual Studio 2013

Ive been asked to write a function that merges two sorted (ascii sorted) strings without duplicates. For example, for string1 = aabcd, and string2 = abbcdg, the end result string should be abcdg. For some reason, the end result string doesnt allocate well, or so I think.. its not working [...] read more
c
string
0votes
1answer

Barebox bootchooser/state integration Raspberry Pi 3 issue

I have an issue regarding barebox bootchooser/state integration for Raspberry Pi 3 (used for multiple rootfs + RAUC software update). I am using the following: Yocto Pyro 2.3.2, barebox 2018.12.0 . I have successfully configured barebox, I can see the output on the debug console. Rpi 3 does not have [...] read more
raspberry-pi
bootloader
sd-card
software-update
yocto-project
0votes
0answers

Shared folder as network drive, some files cannot be written

I have a folder on C:\, let's say C:\ABC, shared as a network folder as R:\ with full access (to this directory and all its contents) to all users. (Win2008R2) Inside the folder I have one specific dir which I have made a site of in IIS7 (functioning well). In [...] read more
batch
network-drive
0votes
0answers

Intel graphics i915 chpip (onboard graphics card) in the Kernel not working

I've got a server and that uses the i915 integrated graphics chip from Intel error The error is: [ 3.015087] AES CTR mode by8 optimization enabled [ 3.029401] iwlwifi 0000:05:00.0: base HW address: f8:94:c2:c1:56:97 [ 3.065668] ieee80211 phy0: Selected rate control algorithm 'iwl-mvm-rs' [ 3.065847] (NULL device ): hwmon_device_register() is [...] read more
linux
kernel
graphical-user-interface
0votes
2answers

Inconsistencies with Linux tc filter u32 matching on packet data payload - can someone explain?

I would just like some heads up on this as I really don't understand -why- this is the case. Further down is the TCPDUMP output (tcpdump -s0 -XXnni eth0 tcp port 80) of the 'HTTP' response a webserver gives when a normal GET request is made to it. What I [...] read more
linux
networking
filter
pcap
tc
0votes
1answer

Why is the IRQ latency in my ARM interrupt handler always the same, regardless of the instruction that is being interrupted?

I am trying to apply a type of side channel attack I read about in this paper that tries to infer execution state from differences in IRQ latencies on a MCU with a cortex M4 processor. The attack carefully interrupts instructions that occur right after a branch and measures the [...] read more
c
arm
0votes
1answer

RISC-V PMP Address Configuration

I am currently learning about PMP in RISC-V, I understand about the TOR, but I'm getting difficulties to understand NA4 and NAPOT configuration enter image description here [https://i.stack.imgur.com/obe5w.png] Can someone make an explanation ? My assumption is, if my pmpaddr is 0xFFFFFFFE then it means my pmp ranges from 0xFFFFFFFE00 [...] read more
specifications
riscv
instruction-set
0votes
1answer

ESP32 Guru Meditation Error while using .substring method

So I have written a function for my ESP32 using the Arduino IDE, and I needed to write a function to take a combined string of hex values like this: ffffff0000ffff0000 And split it into an array, like this: {"ffffff","0000ff","ff0000"} So far, I've written this: String colorIndex[] = {}; void [...] read more
arduino
esp32
0votes
1answer

Difference between ASM/C++ and Python when NEG unsigned 1

I recently stumbled at an error which is present only in Python. Negating unsigned 1 does not equal FFFFFFFF. In Assembler: MOV(eax, 0x1) NEG(eax) > Result is 0xffffffff Same result in C++ In Python however: import numpy as np print(hex(~np.uint32(1))) > Result is 0xfffffffe What am I missing here? read more
python
0votes
1answer

STM32F103 Cannot jump to bootloader from app

I'd like to do a jump to bootloader from application on STM32 Blue Pill STM32F103C8T6. My approach looks that: - Write to BKP->DR1 any value; - Do a reset (NVIC_SystemReset()); - A the beginning of main, check if BKP->DR1 != 0, than set it to 0 and jump to boot; [...] read more
stm32
bootloader
bluepill
0votes
2answers

Flutter: TabBar overflows bottom of AppBar when labels are enabled

I have the following TabBar (I've used flexibleSpace to remove the padding an empty AppBar would put above the TabBar and SafeArea such that the TabBar doesn't appear under the android status bar): home: DefaultTabController( length: 3, child: Scaffold( appBar: AppBar( flexibleSpace: SafeArea( child: Column( mainAxisAlignment: MainAxisAlignment.end, children: [ TabBar( [...] read more
flutter
dart
flutter-layout
0votes
0answers

I can't program a STM32F303CBT6 board with SW4STM32

I made an electronics project based on stm32f303cbt6. I generated a sample code using cubemx. Now I'm trying to run it on MCU, but I can't flash it. I use STlink v2. SW4STM32 tells me: > Open On-Chip Debugger 0.10.0+dev-00021-g524e8c8 (2019-04-12-08:33) Licensed > under GNU GPL v2 For bug reports, [...] read more
stm32
openocd
0votes
0answers

Inverse SQRT for fixed-point values

I am developing a code for a real-time DSP and I need the experts' feedback on part of the code that uses the method mentioned in "Answer 3 to the post Inverse sqrt for fixed point" to implement 1/sqrt(uint). The code is being developed for a TMS320C6455 DSP. Thus, the [...] read more
fixed-point
0votes
1answer

Unexpected behavior parsing recvfrom() message from UDP socket

Currently working with UDP socket, I am stucked trying to understand the following situation. A reception buffer has been defined as follow: char buf[1024]; ... memset(&buf, 0, sizeof(buf)); & is fullfilled by invoking recvfrom() size = recvfrom(sockdf, buf, sizeof(buf), MSG_WAITALL, (struct sockaddr *) &rx, (socklen_t *)&len); I am getting these [...] read more
c
gdb
printf
buffer
recvfrom
0votes
0answers

Problems with the read syscall

I am writing a simple program that reads data from two files and performs a byte-by-byte comparison to find the first(if any) difference between the two. Here is the code I'm having trouble with: it checks to see if the lengths of the files are different and prints appropriately: len1 [...] read more
c
linux
system-calls
0votes
0answers

Why are no dts pts written to my mp4 container

Based on my (self-answered) question here Muxing AVPackets into mp4 file - revisited, I have to ask, what could be the reason why there are no values written for pts/dts in the resulting mp4 container. I examined the container file with the tool MediaInfo. I observe that only the very [...] read more
ffmpeg
libav
libavformat
0votes
2answers

Causing a Buffer Overflow Using fgets

I'm trying to make a buffer overflow on a c program, but I can't manage to find the vulnerability and exploit the code. I've tried thousands of inputs. Generally I've tried these: 1) I've tried the obvious - giving a very long string as an input. 2) I've tried to [...] read more
python
c
buffer-overflow
0votes
1answer

Why nodeMCU tls mbed library got error 40(handshake fail) from Pushbullet API server?

I want to make a nodeMCU IoT project with Pushbullet push service. There are a lot of the same project examples that I'm trying to make. My project is almost same with a below example. nodemcu-pushbullet-notification It seems very simple, but I'm experiencing unexpected difficulties. HTTPS handshake fail with error [...] read more
ssl
tls1.2
nodemcu
mbed
0votes
0answers

Safely Searching Virtual Address Space using NASM

In the following code after calling 'access' system call, 0xfffffffe is present in EAX. While in case of success, 'access' system call returns 0. Here I am trying to access the memory which is part of the data section. Then why 'access' is returning 0xfffffffe ? global _start section .text [...] read more
linux
assembly
x86
nasm
0votes
1answer

Binary Bomb Phase 5 - Looking for two ints as input

I'm currently working on the binary bomb project and am stuck on phase 5. My version appears to be a little different than the other walkthroughs and tutorials I've searched for. This is x86-64 assembly. I've figured out that it is looking for two integers as input. Here is the [...] read more
c
assembly
x86-64
reverse-engineering
att
0votes
1answer

Transform class from C++ to C#

I am new to C# and I need to use a class I had previously in PHP but now I have it in C++, the problem is that I do not know how to transform it to C# in the correct way, I have been trying but I do not [...] read more
c#
c++
encryption
encoding
0votes
0answers

STM32F767ZIT6 Nucleo openocd flash

STM32F767ZIT6 Nucleo board and trying to flash it with blinky code from templates * have populated all the CMSIS and required drivers. * Installed GNU MCU eclipse plugin. * Built the code * Configured openOCD * When trying to debug the code its returns these errors GNU MCU Eclipse 64-bits [...] read more
c++
c
openocd
stm32f7
0votes
2answers

BizTalk Error code: 0xC0002A21, An error occurred while attempting to access the SSO database

I have a BizTalk 2013r2 Standard Edition application server with a dedicated (Separate Sql Server) hosting the BizTalk databases. Just lately, I've started to see a pair of errors in the event log. Typically these are raised about every couple of hour but there's no clear pattern - sometimes they [...] read more
single-sign-on
biztalk
0votes
0answers

ARM ASM Interrupt Vectors (.long in GNU ASM)

I am needing to jump to a very specific place in memory and in order to do this, I am needing to know how the GCC assembler puts .long into the final binary file. .section ".flashconfig" .long 0xFFFFFFFF .long 0xFFFFFFFF .long 0xFFFFFFFF .long 0xFFFFFFFE Which for my layout file, section [...] read more
assembly
gnu
long-integer
bin
0votes
0answers

Calling C++ from JIT code (calling convention)

I'm programming a JIT compiler, that has to call c++ functions from the compiled asm code. I'm working on Windows x64 only so far and implemented the calling convention from microsoft. (https://msdn.microsoft.com/en-us/library/ms235286.aspx) It works, until it doesn't. If the called function is simple and only calls functions that are simple [...] read more
c++
assembly
64-bit
jit
0votes
1answer

Fatal error when calling ARM assembly function from C

I'm trying to implement an example from a book of calling an assembly function from C. But I keep getting a fatal error where the PC = fffffffe and therefore executing code outside of RAM or ROM. Here is my C file, t.c: int g; // uninitialized global int main() [...] read more
c
assembly
arm
qemu
0votes
1answer

how to get a true 16-bit value?

So I'm using an LPC1768 using the mbed interface. This snippet: int16_t test = -1; test -= 1; printf("Value: %d\n", sizeof(test)); if (test== 0xFFFE) { printf("It's stayed the same.\n"); } else if (test== 0xFFFFFFFE) { printf("It's been extended.\n"); } else { printf("None\n"); } prints out Value: 2 It's been extended. [...] read more
c++
types
0votes
3answers

How can I evaluate if my input argument has all even bits set to 1?

I'm trying to do bit logic manipulation in C but getting stuck. I need to write a function that, given an input argument it will evaluate if my argument has all even bits set to 1. For example: myFunction (0xFFFFFFFE) = 0; myFunction (0x55555555) = 1; The operators that I'm [...] read more
c
logic
bit-manipulation
0votes
0answers

Cannot read ZF correctly?

I'm finding myself unable to read the zero flag (ZF) bit correctly. I'm quite confused, because this approach appears to work fine for other flags such as the carry flag (CF) or overflow flag (OF). My strategy is to push the EFLAGS register onto the stack with the instruction pushf, [...] read more
assembly
x86
gnu-assembler
0votes
1answer

Read binary file with ARM assembly

I would you like write a simple program that open a binary file and read every byte. I try to do this using an Android device with this syscalls (https://android.googlesource.com/platform/bionic/+/cd58770/libc/SYSCALLS.TXT) with follow code ... ldr r0, =binaryfile mov r1, #2 mov r7, #5 svc #0 loop: ldr r0,=Handle ldr r0,[r0] [...] read more
android
assembly
arm
0votes
1answer

What is the default type of integral literals represented in hex or octal in C++?

What is by default type of integral literal defined below: 0X123 /* hex , int ? unsigned int? long? unsigned long? */ 0XFFFFFFFE /* hex , value is (2^32-2)=4294967294 .*/ 0123 /*octal */ /* value = 83*/ 042747672777 /* octal , greater than 2^32*/ /* value=4691293695 */ I read in [...] read more
c++
0votes
1answer

Sobel edge-detection, weird output

I´m trying to implement a Sobel algorithm for edge-detection for a YUV camera stream. Initially it seems quite easy but I´m not sure if this approach is correct: * I´m applying the filter just to the Y pixel component and doing U and V = 0 (black and white image). [...] read more
edge-detection
sobel
0votes
1answer

Run an elevated command prompt process

I want to run an elevated command prompt process. I have users: myDomain\myAdmin and myDomain\myUser. If I run next code under myDomain\myAdmin, it works fine. But under myDomain\myUser, next exception appear: "Unknown error (0xfffffffe)". Any ideas why? namespace myProcess { public partial class Form1 : Form { [DllImport("advapi32.dll", SetLastError = [...] read more
c#
0votes
0answers

Why this code is crashing when call procedure in loop?

I tried to write own simple bootloader, I had this code: .code16 # Generate 16 bit code .globl set_protected_mode .globl set_real_mode __init: call set_protected_mode call set_real_mode jmp __init # jmp init # Jump to init function in init.c set_real_mode: cli mov %cr0, %eax and $0xfffffffe,%eax mov %eax, %cr0 sti jmp [...] read more
assembly
x86
bootloader
protected-mode
bochs
0votes
2answers

How to concurrently write and read CUDA array with unique incrementing values?

I have a shared memory array initialized as follows #define UNDEFINED 0xffffffff #define DEFINED 0xfffffffe __shared__ unsigned int array[100]; __shared__ count; // We have enough threads: blockDim.x > 100 array[threadIdx.x] = UNDEFINED; // Initialize count if (threadIdx.x == 0) count = 0; The threads have random access to array. When [...] read more
cuda
0votes
0answers

DLL Injection Static Pointer Different Value

I am trying to write a bot for a game, with a DLL Injection. I have found a static pointer to an address I want to read from the DLL. The static pointer's address is wow64cpu.dll+4738, which I get with cheat engine by: 1. Finding the value (z coordinate of [...] read more
c++
pointers
dll
bots
dll-injection
0votes
3answers

Is ARM (not Thumb) supported on WinPhone8 at all?

I'm facing a weird issue, somewhat similar to this. I have a Windows Phone 8 native DLL project, mostly C++ but with an ARM assembly source in it. The source is in ARM mode (i. e. not Thumb). C++ is compiled to Thumb. The app crashes when C++ tries to [...] read more
assembly
windows-phone-8
arm
thumb
seh
-1votes
1answer

Switch protcted mode (32bits) to real mode (16bits) in asm, low level

I am creating an OS, and I need to call the BIOS in real mode, I tried this code but it has a bug: enter image description here [https://i.stack.imgur.com/8yKZH.png] The error on boch is 00002172825e[CPU0 ] check_cs: conforming code seg descriptor dpl > cpl The code is : global go16 [...] read more
assembly
operating-system
x86-16
bios
low-level
-5votes
2answers

Access violation reading location 0xFFFFFFFE

void inputArray(int* *pa, int *n) { do { printf("Input the elements: "); scanf_s("%d", n); if (*n < 0) { printf("Error! Input again\n"); } } while (*n < 0); *pa = (int*)malloc(*n * sizeof(int)); for (int i = 0; i < *n; i++) { printf("Elements a[%d]: ", i); scanf_s("%d", pa + [...] read more
c
-5votes
4answers

Crashing Pointer Array C++

Code::Blocks, Win7, C++ Hi, I'm creating an overview project for myself, and an integral part includes doing an Exchange Sort in descending order. I've created a simple trial run to test the concept. Embarrassingly enough, I can't get past creating the array without the project crashing. This only happens when [...] read more
c++
arrays
pointers

Comments

Leave a comment

(plain text only)

Sources

  1. https://msdn.microsoft.com/en-us/library/cc231198.aspx

User contributions licensed under CC BY-SA 3.0