0% found this document useful (0 votes)
1 views3 pages

SFT Workshop 1

The document reflects on a workshop where the author identified several bugs related to string initialization and memory management in C programming. The author emphasizes the importance of code inspection and testing, utilizing Visual Studio to evaluate code behavior with various inputs. Their prior experience with coding walkthroughs and knowledge of C programming facilitated the bug-finding process during the workshop.

Uploaded by

vermakashish120
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1 views3 pages

SFT Workshop 1

The document reflects on a workshop where the author identified several bugs related to string initialization and memory management in C programming. The author emphasizes the importance of code inspection and testing, utilizing Visual Studio to evaluate code behavior with various inputs. Their prior experience with coding walkthroughs and knowledge of C programming facilitated the bug-finding process during the workshop.

Uploaded by

vermakashish120
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

A Reflection, Research, and

Assessment
SFT Workshop -1

Name: Kashish Verma


Student Id: 151579232
Email: [email protected]
Section: ZBB

1. Bug 1 - Improper string initialization using braces { } without a null


terminator.
Bug 2 - Fixed-size buffer without dynamically allocating memory,
potentially leading to buffer overflow.
Bug 3 - Buffer overflow due to a for loop copying characters without
checking the size of the prefix.
Bug 4 - Incorrect comparison of suffix length [String shorter than the
suffix] with the input string, leading to unexpected behavior.

Inspection seemed more useful to me as we had a practice of doing coding


walkthroughs in previous semesters, which made it easy to review the code
thoroughly. Additionally, bugs related to string initialization were hard to
detect through testing alone, as they often produced correct output but were
identified as incorrect during inspection. This shows the importance of
reviewing coding standards and best practices to ensure code quality. Testing
proved useful when the prefix size was larger than the original string, making
the program exit. In testing, I copied the code to Visual Studio
and changed input strings to evaluate their behavior using the compiler. This
method allowed me to execute the code with different inputs and observe its
output directly.

In this workshop, I just used Visual Studio and its compiler to test the code.
To improve testing, I think using various advanced tools and learning
different methods of software testing can significantly enhance testing
quality.
2. Finding bugs in this workshop was not quite difficult. These bugs were
mainly related to common C programming standards like proper
initialization of a string and memory management practices. In the
previous semester, I did code walkthroughs of C language and learned
quite a bit about it due to which it was manageable for me to complete
this task. Other than that, using the Visual Studio compiler to test
different cases and checking its answers made me more sure about the
logical errors in two functions startsWith and endsWith. By
systematically testing different input cases, I was able to pinpoint
specific areas where the code might not be functioning as expected. In
conclusion, my background knowledge in C programming, hands-on
experience with coding walkthroughs, and testing practices contributed
to finding bugs easily in this workshop.

You might also like